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

doc(readme): announce InstantSearch compatibility #184

Merged
merged 4 commits into from
May 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
> 🙌 From now on you can use Algolia Recommend from withing InstantSearch, simplifying your integration between the two libraries!
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
>
> Learn how to migrate following the [upgrade guide](https://www.algolia.com/doc/guides/algolia-recommend/upgrade-guides) provided.
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
Haroenv marked this conversation as resolved.
Show resolved Hide resolved


```js
instantsearch({
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
// No need for a recommendClient anymore
searchClient,
indexName,
}).addWidgets([
frequentlyBoughtTogether({
container: '#frequentlyBoughtTogether',
objectIDs: [currentObjectID],
}),
relatedProducts({
container: '#relatedProducts',
objectIDs: [currentObjectID],
}),
])
```

```jsx
<InstantSearch searchClient={searchClient} indexName={indexName}>
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
<FrequentlyBoughtTogether objectIDs={[currentObjectID]} />
<RelatedProducts objectIDs={[currentObjectID]} />
</InstantSearch>
```

---
---
---

# Recommend

[![Version](https://img.shields.io/npm/v/@algolia/recommend-js.svg?style=flat-square)](https://www.npmjs.com/package/@algolia/recommend-js) [![MIT License](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE)
Expand Down
Loading