unistore
unistore copied to clipboard
🌶 350b / 650b state container with component actions for Preact & React
``` @connect({ a: 'a', }, { doSomething: () => { return {a: 'b'}; } }) export class Example extends Component { componentDidMount() { this.props.doSomething(); } componentWillReceiveProps(nextProps) { console.log("nextProps", nextProps); }...
Hello, When using actions I see two problems. 1. If there are alot of actions, they kind of pollute the prop root and cause prop hell. 2. There's no good...
Hello, I initially wanted to “sync” the store online, for that I tried to bind store events into api calls however we only received the new state as a parameter...
Hi, I worked on a little [PR](https://github.com/developit/unistore/pull/161) adding mutations The implementation is small and optional to usage, however enabling mutations is radical in a sense that they disable the standard...
I.E: I'd like to use redux-logger with unistore, is there any way to apply it as a middleware to the store?
This works... maybe worth adding to the readme. ```js // If actions is a function, it gets passed the store: let actions = store => ({ // Actions can just...
Hello! Tell me, please, how i can join reducers, like "combineReducers" in Redux?
Similar to #75 You sometimes need to run an action from outside a connected component. I haven't seen a recommended pattern to do this so have come up with a...
When I refresh the page the state is lost with unistore which is similar to redux. React/Redux has middleware libs to persist the state. What are the options with unistore...
Trying to use unistore with gatsby.js, however, im not sure if it is compatible since gatsby outputs static pages. Has anyone made it work with gatsby before?