Redux Middleware Flashcards
What is a controlled field?
A form element where the value of the input is set by the state of our component, NOT the other way around. NOT what’s in the input field, what is in the state
What is the advantage of using a form in REACT?
You get some free functionality and don’t need to worry about a lot of edge cases. So , input from user, think about using form and think about using preventDefault
What is middleware?
A gatekeeper of sorts. Let’s action pass, manipulate, create, delete. Follows after action creator has determined the action
What is redux promise?
An NPM package that’s popular for redux to handle AJAX requests
Explain the flow of redux-promise middleware
What were some important concepts on the weather react-redux
1) actions index, action creator, fetch from open weather api, made a const action, and used for reducers.
2) redux-promise in action creator, promises and redux promise to resolve and takes the data and replace the request with data, send the action to reducers
3) weather reducer, stored data from weather api…NOT MUTATING, new array then modifying existing array
4) Googlemap component we used reacts ref system to the div and then fed the ref to render an libray iframe and could see the actual city appearing. Third party libraries like google maps in react-redux