Skip to content
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][sitecore-jss-react][BYOC] always pass fetched props #1667

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

art-alexeyenko
Copy link
Contributor

@art-alexeyenko art-alexeyenko commented Nov 17, 2023

Description / Motivation

Pass fetchedData over to BYOC at all times without overriding the ComponentProps

Testing Details

  • Unit Test Adjusted
  • Manual Test/Other - connected mode still works

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested a review from a team November 17, 2023 18:34
// we render fallback on client to avoid problems with client-only components
return (
<FEAAS.ExternalComponent
componentName={componentName}
clientFallback={fallbackComponent}
datasources={props.fetchedData}
{...componentProps}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to omit datasources from here since i imagine that shouldn't be overridden

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that datasources makes sense here, as componentProps is not the props, it's props.params.ComponentProps

Copy link
Contributor

@Inviz Inviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. thank you!

Copy link
Contributor

@addy-pathania addy-pathania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍🏼

@addy-pathania addy-pathania merged commit 2abffe5 into dev Nov 20, 2023
@addy-pathania addy-pathania deleted the feature/jss-1202-merge-data-byoc branch November 20, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants