error storing data, {}- Redux Persist

Multi tool use


error storing data, {}- Redux Persist
So I was able to successfully link up my store to my main App.js, but now I get this error about storing data. I tried to purge to see if that would do anything, and I got a similar error where it said it could not purge data stored store {}.
UPDATE:
The issue is relating to const storage
and the redux-persist-sensitive-storage library. Still, don't know how to save the data with this library.
const storage
store.js:
const initialState = {};
const storage = createSensitiveStorage({
keychainService: "myKeychain",
sharedPreferencesName: "mySharedPrefs"
});
const config = {
key: "root",
storage,
};
const middleware = [thunk];
const reducer = persistCombineReducers(config, rootReducer);
export default () => {
let store = createStore(
reducer,
initialState,
compose(applyMiddleware(...middleware))
);
let persistor = persistStore(store);
return { store, persistor }
}
index.js- reducers
export default ({
profile: profileReducer,
auth: authReducer,
photoSlider,
trip: tripReducer,
moment: momentReducer
})
example of one of my reducers:
import {
SET_TRIP,
CREATE_TRIP
} from '../actions';
const initialState = {
trip:
}
const tripReducer = (state = initialState, action) => {
switch(action.type) {
case SET_TRIP:
return {
...state,
trip: action.trip
};
case CREATE_TRIP:
return {
...state,
trip: action.payload
}
default:
return state;
}
}
export default tripReducer
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.