redux-zero
Advanced tools
Changelog
5.1.3
Changelog
5.1.0
useStore
, useSelector
and useAction
hooks.const Counter = () => {
const store = useStore();
const count = useSelector(({ count }) => count);
const incrementBy = useAction(({ count }, value) => ({
count: count + value
}));
return (
<>
<p>Value: {count}</p>
<button onClick={() => incrementBy(10)}>10 More</button>
</>
);
};
Changelog
5.0.5
mapStateToProps
function when the component props change,
not just when the state store changes