-
Notifications
You must be signed in to change notification settings - Fork 276
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] Bring your own code (BYOC) feature #1568
Conversation
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 Great. Added one minor suggestion.
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.
Does this solution account for error handling within Sitecore editors (since we know React error boundaries do not work in Next.js/SSR)? For example, if there is an error in a BYOC component, will it be isolated to the component or affect the entire page?
packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/BYOCWrapper.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 great 👍
See some minor suggestions below
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.
Looking really good. Just a few things noticed related to error handling.
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 a couple suggestions, otherwise this looks great!
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.
👍🏼
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.
👍
Description / Motivation
BYOC unwrapped allows developers to create components and then use them without following the component deployment guidelines. It means that components:
Right now BYOC can be used with Component Builder, but this PR allows using registered components on a page, directly.
Minor side effect of this PR is changes to MissingComponent - it can now display custom error messages to accommodate BYOC usecases.
Testing Details
Types of changes