Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(insights): add getInsightsAnonymousUserToken helper #2887

Merged
merged 7 commits into from
Jan 10, 2020

Conversation

tkrugg
Copy link
Contributor

@tkrugg tkrugg commented Jan 6, 2020

Summary

This PR adds getInsightsAnonymousUserToken to react-instantsearch-dom.
Related RFC: https://github.com/algolia/instantsearch-rfcs/pull/27

// usage
import { Configure, getInsightsAnonymousUserToken } from 'react-instantsearch-dom';

<Configure
  enablePersonalization={true}
  userToken={getInsightsAnonymousUserToken()}
/>

@tkrugg tkrugg force-pushed the feats/ease-insights-integration-3 branch from da11062 to 1e09a4c Compare January 7, 2020 16:37
@tkrugg tkrugg requested a review from a team January 9, 2020 16:01
@ghost ghost requested review from eunjae-lee and Haroenv and removed request for a team January 9, 2020 16:01
Copy link
Contributor

@Haroenv Haroenv 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, same as InstantSearch.js

Copy link
Member

@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.

If we still want to maintain the react-instantsearch package, we might want to export the helper in this file too.

tkrugg and others added 2 commits January 9, 2020 17:47
…sAnonymousUserToken.ts

Co-Authored-By: François Chalifour <francoischalifour@users.noreply.github.com>
@tkrugg
Copy link
Contributor Author

tkrugg commented Jan 10, 2020

If we still want to maintain the react-instantsearch package, we might want to export the helper in this file too.

Good point! done here fd10690

@tkrugg tkrugg merged commit b5fe4f7 into master Jan 10, 2020
@tkrugg tkrugg deleted the feats/ease-insights-integration-3 branch January 10, 2020 16:49
francoischalifour added a commit that referenced this pull request Jan 20, 2020
# [6.2.0](v6.1.0...v6.2.0) (2020-01-20)

### Bug Fixes

* **deps:** update dependency algoliasearch to v3.35.1 ([#2802](#2802)) ([cfb91f0](cfb91f0))
* **widgets:** rename `ExperimentalConfigureRelatedItems` compon… ([#2891](#2891)) ([b910df2](b910df2))

### Features

* **insights:** add getInsightsAnonymousUserToken helper ([#2887](#2887)) ([b5fe4f7](b5fe4f7))
* **widgets:** introduce `ConfigureRelatedItems` as experimental ([#2880](#2880)) ([923cd43](923cd43))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants