text: import {applyMiddleware, createStore, combineReducers} from 'redux';
  import {persistStore, persistReducer} from 'redux-persist';
  import AsyncStorage from '@react-native-community/async-storage';
  import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
  import thunk from 'redux-thunk';
  
  import observationsReducer from './reducers/ObservationsReducer';
  import sortReducer from './reducers/SortReducer';
  
  const rootReducer = combineReducers({
    observations: observationsReducer,
    sorter: sortReducer,
  });
  
  const persistConfig = {
    key: 'root',
    storage: AsyncStorage,
    stateReconciler: autoMergeLevel2,
  };
  
  const pReducer = persistReducer(persistConfig, rootReducer);
  
  export const store = createStore(pReducer, applyMiddleware(thunk));
  export const persistor = persistStore(store);
  