You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry to point that out, and some people will obviously disagree, but I live in a world where redux is not getting much hype and people are hard to convince and try something if it's hard to get or if the benefit is not obvious.
A good naming is the best way to help people apprehend something unfamiliar, and I think Redux needs and deserves this <= this is my motivation for writing this issue as I strongly believe Redux is a great way to organize a scalable application !
And watch this only exception, which has the particularity of returning nothing : useEffect(() => { ...my effect code ... });
Let's face this implicit rule of hooks: a hook named use{something} is a hook that returns {something}
When I saw you introduced 'useDispatch', I already knew how to call it. I quick-checked the documentation and it was how I expected it to be.
But I did not find the hook to access the data in my Redux store. Until I guessed it was useSelector... but... I don't want to use a selector, I want to use data from the store.
The selector is just the way to access it, it's a detail. To me it's like useRef was named useDefaultValue of course you provide a default value, but that's not what you want to use in the end.
useRedux would be bad as well, as you have no idea what it can return.
My best proposal right now is useStored which is shorter than useStoredData, but clear when you read the code and discover the API. Plus it's a reminder of the Redux Store.
But maybe you have a better name ?
The text was updated successfully, but these errors were encountered:
I'm sorry to point that out, and some people will obviously disagree, but I live in a world where redux is not getting much hype and people are hard to convince and try something if it's hard to get or if the benefit is not obvious.
A good naming is the best way to help people apprehend something unfamiliar, and I think Redux needs and deserves this <= this is my motivation for writing this issue as I strongly believe Redux is a great way to organize a scalable application !
Watch those :
And watch this only exception, which has the particularity of returning nothing :
useEffect(() => { ...my effect code ... });
Let's face this implicit rule of hooks: a hook named use{something} is a hook that returns {something}
When I saw you introduced 'useDispatch', I already knew how to call it. I quick-checked the documentation and it was how I expected it to be.
But I did not find the hook to access the data in my Redux store. Until I guessed it was useSelector... but... I don't want to use a selector, I want to use data from the store.
The selector is just the way to access it, it's a detail. To me it's like useRef was named useDefaultValue of course you provide a default value, but that's not what you want to use in the end.
useRedux would be bad as well, as you have no idea what it can return.
My best proposal right now is useStored which is shorter than useStoredData, but clear when you read the code and discover the API. Plus it's a reminder of the Redux Store.
But maybe you have a better name ?
The text was updated successfully, but these errors were encountered: