-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: theme switching delay and screen animation flickering
- Loading branch information
1 parent
c3c2c34
commit da8b224
Showing
9 changed files
with
394 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
// Learn more https://docs.expo.io/guides/customizing-metro | ||
const { getDefaultConfig } = require('expo/metro-config'); | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
|
||
module.exports = getDefaultConfig(__dirname); | ||
const defaultConfig = getDefaultConfig(__dirname); | ||
defaultConfig.resolver.sourceExts = ["jsx", "js", "ts", "tsx", "mjs"]; | ||
module.exports = defaultConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
import { configureStore, combineReducers } from "@reduxjs/toolkit"; | ||
import AsyncStorage from "@react-native-async-storage/async-storage"; | ||
import { persistReducer, persistStore } from "redux-persist"; | ||
|
||
import appThemeReducer from "./features/appTheme/appThemeSlice"; | ||
import addNoteReducer from "./features/addNote/addNoteSlice"; | ||
|
||
const reducer = combineReducers({ | ||
const persistConfig = { | ||
key: "root", | ||
storage: AsyncStorage, | ||
}; | ||
|
||
const rootReducer = combineReducers({ | ||
appTheme: appThemeReducer, | ||
addNote: addNoteReducer, | ||
}); | ||
|
||
const persistedReducer = persistReducer(persistConfig, rootReducer); | ||
|
||
export const store = configureStore({ | ||
reducer: reducer, | ||
reducer: persistedReducer, | ||
middleware: (getDefaultMiddleware) => | ||
getDefaultMiddleware({ | ||
serializableCheck: false, | ||
}), | ||
}); | ||
export const persistor = persistStore(store); | ||
|
||
export type RootState = ReturnType<typeof store.getState>; | ||
export type AppDispatch = typeof store.dispatch; |
Oops, something went wrong.