Jason Miller
Jason Miller
The store doesn't know about actions, since they are not centrally registered.
I use `node-debug` (from [node-inspector](https://github.com/node-inspector/node-inspector)) via `babel-node`: ``` sh npm i -g node-inspector node-debug ./node_modules/.bin/babel-node src --presets es2015,stage-0 ``` Might be better to debug the transpiled source in `dist` though:...
I like it! It'd be a little unfortunate to drop the action binding stuff though. Maybe something like this? ```js import { createContext } from 'preact'; import { useState, useContext,...
Another neat alternative would be to split the hooks into `useStoreState()` and `useActions()`: ```js const ACTIONS = { add: ({ count }) => ({ count: count + 1 }) };...
@mihar-22 looks really good. The only change I'd like to see in your implementation is to allow passing [selector](https://github.com/developit/unistore/blob/master/src/util.js#L13) values to `useSelector()` rather than just functions. You can `import {...
Would be a good example to have yeah.
Ah interesting. We'll need to add an option to Microbundle to allow configuring that.
Might be worth changing the readme to more explicitly spell out the outer function and calling contexts: ```js // If actions is a function, it gets passed the store: function...
FWIW I see the value in this PR. Do you think it's possible to make this approach work? Right now manually specifying props outside VS inside connect() is cumbersome.
I believe there's another example that shows the getState() version - perhaps we'd be better off showing a synchronous function for this example? I just wanted to have a way...