How to use the ld-redux.init function in ld-redux

To help you get started, we’ve selected a few ld-redux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yusinto / ld-redux / example / src / client / index.js View on Github external
import React from 'react';
import { hydrate } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import routes from '../universal/routes';
import { Provider } from 'react-redux';
import createStore from '../universal/redux/store';
import ldRedux from 'ld-redux';
import flags from '../../flags.json';

const reduxState = window.__INITIAL_STATE__ || undefined;
const store = createStore(reduxState);

ldRedux.init({
  clientSideId: '59b2b2596d1a250b1c78baa4',
  dispatch: store.dispatch,
  flags,
});

hydrate(
  
    
  ,
  document.getElementById('reactDiv'),
);

ld-redux

A library to integrate launch darkly with react redux

MIT
Latest version published 3 years ago

Package Health Score

39 / 100
Full package analysis