Skip to content
Advertisement

Tag: redux

Cannot call Action within another Action

I am having trouble understanding this behaviour I have an action defined like this and whatever() is defined like this I expect whatever() to be executed, but it is not. Why is that? Answer Both onDone and whatever here are not “actions”, they are “action creators”. They are functions that return an action (“thunk actions” in this case). An action

My hooks aren’t opening and closing my modals

I’m new to react and redux, I’m trying to do things the newish hooks way and running into issues opening and closing a Modal using a redux state. Basically, as soon as my page loads, the modal opens, even though the initial state in the slice is set to false and the close button in the modal footer doesn’t close

Attempted import error: ‘getMoviesList’ is not exported from ‘./actions’; error in react redux

I’m trying to import a function ‘getMoviesList’ written in action/index.js but getting an error even though my code and paths are correct Please have a look on my App.js ( where I’m trying to import that function ) and ./action/index.js ( where I have defined that function ) App.js action/index.js Answer change import { getMoviesList } from ‘./actions’; to import

Advertisement