unistore icon indicating copy to clipboard operation
unistore copied to clipboard

🌶 350b / 650b state container with component actions for Preact & React

Results 48 unistore issues
Sort by recently updated
recently updated
newest added

```js /** * Available methods * * value * isValue * setValue({ item: value }) * withValue({ item: value }) * * @param {*} key */ export function useStore(key) {...

enhancement
help wanted
discussion

This PR implements the option to initialize a store with an extra argument that will be passed to each invocation of action functions. This is very similar to the extra...

Maybe this opens a can of worms. I don't know. I found it useful. Real middleware would make it cooler. ```javascript let helpers = { setUser: (val) => ({ user:...

This PR rethinks actions and action creators. An action now simply becomes an unbound function with two arguments, `state` and `store` (or only `store`, see discussion below). More commonly a...

See blog post for the issue/solution: [https://kaihao.dev/posts/Stale-props-and-zombie-children-in-Redux](https://kaihao.dev/posts/Stale-props-and-zombie-children-in-Redux)

Hey, using the current `connect` in typescript seems to give not as much type safety as possible. I came ob with these types/changes to make it more safe for us,...

Unistore will go very well with web components. It can have bindings for LitElement and others. I am interested to work on this if it will accepted.

help wanted
good first issue

Hi, I am trying to use unistore with next.js. It works great until a page has a static method getInitialProps that needs to be called. The way next.js works is...

Hello. I want to offer an interesting feature. How about making connect able to take not only a component but also an effect? At first glance it sounds strange, but...

I'm wondering about this example in the README: ``` // Async actions can be pure async/promise functions: async getStuff(state) { let res = await fetch('/foo.json') return { stuff: await res.json()...