Skip to content

feat(recommendations): add fallbackComponent prop#23

Merged
francoischalifour merged 3 commits intonextfrom
feat/fallbackComponent-prop
May 25, 2021
Merged

feat(recommendations): add fallbackComponent prop#23
francoischalifour merged 3 commits intonextfrom
feat/fallbackComponent-prop

Conversation

@francoischalifour
Copy link
Copy Markdown
Contributor

This introduces a new prop called fallbackComponent that is called when no recommendations are returned by the engine.

A pattern that we want to encourage is to display Related Products when there's no FBT, as seen in the demo.

Copy link
Copy Markdown
Member

@shortcuts shortcuts 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!

Note for future improvements: we might want to pass some of the pre-defined parameters to the fallbackComponent function (I think itemComponent, objectIDs make sense)

@francoischalifour francoischalifour merged commit 3c6b8b8 into next May 25, 2021
@francoischalifour francoischalifour deleted the feat/fallbackComponent-prop branch May 25, 2021 15:36
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.

2 participants