-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nextjs] Render FEaaS components server side #1413
Conversation
Seems like a solid work. Thanks Artem for working through the kinks with me, your help is very appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! Please, see review comments below
packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/FEaaSWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/FEaaSWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/FEaaSWrapper.tsx
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/FEaaSWrapper.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we lost use of Sitecore datasources (code which reads datasource component fields was removed). Based on the PR description, this was intentional. Is there more coming to bring this back? Or is this now somehow built in to the FEAAS SDK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last thought. Otherwise, looks good to me
@art-alexeyenko Please, add note to CHANGELOG file and see comments above + unresolved comments |
Ensure feaas-component can generate server markup as well as client one.
Description / Motivation
FEaaS wrapper would only add a client component previously - so all the rendering would be done client-side.
With this change we support FEaaS wrapper generating server markup. At the same time there's a fallback to only generate client component when required server props are missing.
It also includes a rework of how it handles extra data (i.e. fields are no longer a part of props), but perhaps it needs to be reintroduced.
Testing Details
Types of changes