Installation

npm

react-tesfy could be installed via npm or yarn. This is the recommended way to get the library.

npm install react-tesfy --save
# or
yarn add react-tesfy

Initialization

Create an engine instance using a datafile and optionally a storage layer to enable sticky bucketing, a userId and a set of attributes and then render the provider with it.

import { createInstance, TesfyProvider } from 'react-tesfy';
const App = () => {
const engine = createInstance({ datafile, userId });
return (
<TesfyProvider engine={engine}>
{children}
</TesfyProvider>
);
};