Interview question
What is the Hooks + Redux pattern? Hooks + Redux pattern क्या है?
Answer
// Hooks + Redux
function Counter() {
const count = useSelector(state => state.count);
const dispatch = useDispatch();
return (
<button onClick={() => dispatch(increment())}>
{count}
</button>
);
}React hooks के साथ Redux use कर सकते हैं।Was this answer clear?