We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with current API:
provideState(injectState(Component))
I think we should consider departing completely from the implicit inheritance API and favor a local (with explicit inheritance) API.
The text was updated successfully, but these errors were encountered:
Maybe we should remove the ability to decorate any component, simply accept a render function:
const Parent = withStore( { initialState: () => ({ value: '' }), effects: { onChange: event => ({ value: event.target.value }), } }, (store, props) => ( <input onChange={store.effects.onChange} value={store.state.value} /> ) ) const Child = Parent.injectStore( (parentStore, props) => ( <div>{parentStore.state.value}</div> ) )
And provide a nice syntax to use multiple stores:
import App from '../../' import Form from '../' const MyComponent = App.injectStore( Form.injectStore( (formStore, appStore, props) => ( <div /> ) ) )
Sorry, something went wrong.
Maybe Reaclette should not provide inheritance and let users use React features like useContext().
useContext()
No branches or pull requests
Issue with current API:
provideState(injectState(Component))
I think we should consider departing completely from the implicit inheritance API and favor a local (with explicit inheritance) API.
The text was updated successfully, but these errors were encountered: