kadirahq / react-simple-di

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

mapped props should not override component props #9

Open macrozone opened 7 years ago

macrozone commented 7 years ago

currently mapped props will always override any property passed:


        const newProps = {
          ...this.props,
          ...mappedProps
        };

This makes it impossible to override such a property.

Switching it the other way around would make it more flexible:


        const newProps = {
          ...mappedProps
          ...this.props,
        };