Skip to content

feat(transformItems): Add transformItems function to useRecommendations hook#9

Merged
shortcuts merged 4 commits intonextfrom
feat/transformItems
May 17, 2021
Merged

feat(transformItems): Add transformItems function to useRecommendations hook#9
shortcuts merged 4 commits intonextfrom
feat/transformItems

Conversation

@shortcuts
Copy link
Copy Markdown
Member

Summary

Similar API as in InstantSearch.js, it receive the items returned by the query and allow the user to change its content, order, etc. The shape returned should remain the same.

Results

Any recommendations component can now use transformItems to transform the results returned by Algolia.

Preview

Comment thread packages/react-recommendations/src/useRecommendations.ts Outdated
Copy link
Copy Markdown
Contributor

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

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

Let's merge this once https://github.com/algolia/react-recommendations/pull/9/files#r632578219 is addressed, if it makes sense to you.

Comment thread packages/react-recommendations/src/types/RecommendationTransformItems.ts Outdated
@shortcuts shortcuts merged commit 6d4dded into next May 17, 2021
@shortcuts shortcuts deleted the feat/transformItems branch May 17, 2021 07:56
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.

3 participants