Answer the question
In order to leave comments, you need to log in
Do I need to use useEffect?
There is a project on react + redux.
And there is such a component (conditionally):
const Component = () => {
const dispatch = useDispatch();
const onSelect = (value) => {
dispatch(selectAction(value));
};
return (
<select onChange={(e) => onSelect(e.target.value)}>
<option value="1">1</option>
<option value="2">3</option>
<option value="3">3</option>
</select>
);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question