How to use the ld-redux.ldConnect 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 / universal / domain / home / homeContainer.js View on Github external
import HomeComponent from './homeComponent';
import ldRedux, {ldConnect} from 'ld-redux';
import {homeFlags} from './homeLogic';

const mapStateToProps = (state) => {
  const homeState = state.Home;
  const flags = ldRedux.getFlags(state, homeFlags);

  return {
    ...homeState,
    ...flags,
  };
};

@connect(mapStateToProps, homeActions)
@ldConnect(homeFlags)
export default class HomeContainer extends Component {
  render() {
    return ;
  }
}

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