cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Dispatch Console

aceankit99
Line Chef
Line Chef

Issue with Dispatch Console

when ever I am assigning an work order to a technician using dispatch console, its saying please update estimated duration to create events. But estimated duration field is greyed out and not editable.

 

Untitled.pngUntitled2.png

0 Likes
Reply
Richardson_09
Line Chef
Line Chef

User Reply Issue with Dispatch Console Richardson_09

You need to actually dispatch that action, not just call the action creator.

const dispatch = useDispatch();
useEffect(() => {
dispatch(actions.menuItemsFetchRandom(8))
}, [])
PS: also, there is no need to use connect in function components. Using useSelector and useDispatch is much easier and the official recommendation. Additionally, you are writing a pretty outdated style of redux that makes you write a multitude of the code that is required with modern redux. You are likely following very outdated tutorials.

0 Likes
Reply