Skip to content

Commit

Permalink
rc.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzitelli committed Feb 2, 2023
1 parent 75fc46a commit f7f7976
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rn-navio",
"version": "0.0.2-rc.15",
"version": "0.0.2-rc.16",
"description": "🧭 Navio - navigation library for React Native (Expo). Build the app's layout in one place and use benefits of types predictibility. Built on top of React Navigation (RNN will be added soon).",
"author": "Batyr <dev@batyr.io>",
"homepage": "https://github.com/kanzitelli/rn-navio",
Expand Down
9 changes: 8 additions & 1 deletion src/navio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export class Navio<
private navRef: NavigationContainerRefWithCurrent<any>;
private navIsReadyRef: React.MutableRefObject<boolean | null>;
private emitter: NavioEmitter;
private tabUpdatedOptions: TTabUpdatedOptions;

// ========
// | Init |
Expand All @@ -148,6 +149,7 @@ export class Navio<

// Layout
this.layout = data;
this.tabUpdatedOptions = {name: '', options: {}};

// Navigation
this.navRef = createNavigationContainerRef<any>();
Expand Down Expand Up @@ -735,10 +737,15 @@ export class Navio<
// -- subscribing to emitter events
this.emitter.on('tabs.updateOptions', params => {
if (!params) return;
setTabUpdatedOptions(params);
// setTabUpdatedOptions(params);
this.tabUpdatedOptions = params;
});
}, [this.emitter]);

useEffect(() => {
console.log(tabUpdatedOptions);
}, [this.tabUpdatedOptions]);

// Internal methods
const _navContainerRef = (instance: NavigationContainerRef<{}> | null) => {
this.navRef.current = instance;
Expand Down

0 comments on commit f7f7976

Please sign in to comment.