kadirahq / react-simple-di

Simple Dependancy Injection Solution for React
MIT License
56 stars 24 forks source link

pass props to mapper #6

Open achtan opened 8 years ago

achtan commented 8 years ago

is it possible to pass props to mapper?

export const mapper = (context, actions) => {
  // how to access props from component?
  return {
    context: () => context,
    actions: () => actions
  }
};
macrozone commented 7 years ago

I think the deps mapping should be static. You can use react-komposer to create new properties and use the parts of the context there

achtan commented 7 years ago

and how about new v2.0 komposer? there is no such thing as old-mapper from v1. So where should i map my actions?