9 Concepts) Session Storage + Persistence Flashcards

1
Q

data can be stored locally using what object property?

A

The localStorage property of the window object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What package gives you the ability to keep data if a page refreshes?

A

“redux-persist”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What function from “redux-persist” allows one to persist a project’s store? What are its args?

A

persistStore(store)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What function from “redux-persist” allows one to persist a projects root reducer? What are its args?

A

persistReducer(persistConfig, rootReducer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What React component must be wrapped around the app component to allow persistor to work?

A

PersistGate persistor={persistor}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why should you put a component’s state data into redux even when that data may not be used in any other components?

A

It makes the data easier to test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly