Skip to content

Commit

Permalink
fix(typescript): useInitialRootStore callback should be optional (#2616
Browse files Browse the repository at this point in the history
… by @Jpoliachik)
  • Loading branch information
Jpoliachik authored Jan 26, 2024
1 parent b8ac23f commit 0ecfe66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boilerplate/app/models/helpers/useStores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const useStores = () => useContext(RootStoreContext)
* and then rehydrates it. It connects everything with Reactotron
* and then lets the app know that everything is ready to go.
*/
export const useInitialRootStore = (callback: () => void | Promise<void>) => {
export const useInitialRootStore = (callback?: () => void | Promise<void>) => {
const rootStore = useStores()
const [rehydrated, setRehydrated] = useState(false)

Expand Down

0 comments on commit 0ecfe66

Please sign in to comment.