@applicaster/quick-brick-core 12.0.0-alpha.4337072244 → 12.0.0-alpha.4342066143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -672,15 +672,15 @@ export function NavigationProvider({ children }: Props) {
672
672
 
673
673
  // It will only work for the regular stack and pathname, It won't work for modals
674
674
  // TODO: integrate video/hook and regular modal into stack.
675
- const getStackForPathname = (
676
- pathname: string
677
- ): NavigationScreenState | undefined => {
678
- const stack = [...state?.stack?.mainStack];
675
+ const getStackForPathname = React.useCallback((pathname: string):
676
+ | NavigationScreenState
677
+ | undefined => {
678
+ const stack = [...stateRef?.current?.stack?.mainStack];
679
679
 
680
680
  const currentStack = stack.find(({ route }) => route === pathname);
681
681
 
682
682
  return currentStack;
683
- };
683
+ }, []);
684
684
 
685
685
  const navigator: QuickBrickAppNavigator = React.useMemo(
686
686
  () => ({
@@ -724,7 +724,7 @@ export function NavigationProvider({ children }: Props) {
724
724
  replaceTop,
725
725
  getStack,
726
726
  getStackForPathname,
727
- mainStack: state.stack.mainStack,
727
+ mainStack: state?.stack?.mainStack,
728
728
  }),
729
729
  [rivers, plugins, JSON.stringify(state), appLaunched, startUpHooks]
730
730
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "12.0.0-alpha.4337072244",
3
+ "version": "12.0.0-alpha.4342066143",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "homepage": "https://github.com/applicaster/quickbrick#readme",
32
32
  "dependencies": {
33
- "@applicaster/applicaster-types": "12.0.0-alpha.4337072244",
34
- "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.4337072244",
35
- "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.4337072244",
36
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.4337072244",
37
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.4337072244",
38
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4337072244",
39
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.4337072244",
33
+ "@applicaster/applicaster-types": "12.0.0-alpha.4342066143",
34
+ "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.4342066143",
35
+ "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.4342066143",
36
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.4342066143",
37
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.4342066143",
38
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4342066143",
39
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.4342066143",
40
40
  "atob": "^2.1.2",
41
41
  "axios": "^0.28.0",
42
42
  "btoa": "^1.2.1",