Wondering what’s next for npm?Check out our public roadmap! »

fluxible-resolver

1.0.21 • Public • Published

fluxible-resolver

Usage

import resolveToStores from 'fluxible-resolver';
 
const stores = [RecipeStore];
const getStateFromStores = context => ({
  cake: context.getStore(RecipeStore).getCakeRecipe()
});
const resolvers = {
  cake: {
    dependencies: [], // optional
    resolver: context => context.executeAction(fetchCakeRecipe)
  }
};
const inputPropTypes = {
    inputProp: PropTypes.any
};
 
const Container = resolveToStores(stores, getStateFromStores, resolvers, propTypes /* optional */)(Component);
 

Open Questions

  • must be undefined to be unresolved
  • what happens when a value is still undef after resolve?
  • failure cases?
  • deadlocks?
  • input prop deps
  • restrict resolver input to deps

Keywords

none

Install

npm i [email protected]

Version

1.0.21

License

ISC

Last publish

Collaborators

  • avatar