@qontinui/ui-bridge-native 0.6.14 → 0.6.16

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.
package/README.md CHANGED
@@ -152,6 +152,23 @@ const buttons = await find({ types: ['button'] });
152
152
  await executeAction('submit-button', { action: 'press' });
153
153
  ```
154
154
 
155
+ ### useRouteAwareness
156
+
157
+ Report the current screen as a route **template** (never the concrete path), emitted on every snapshot as `page.route`. Derive the template with `expoRouterPattern(useSegments())` (Expo Router) or `reactNavigationPattern(state)` (React Navigation), and set `patternSource: 'router'`.
158
+
159
+ ```tsx
160
+ import { useSegments } from 'expo-router';
161
+ import { expoRouterPattern, isExpoRouterUnmatched, useRouteAwareness } from '@qontinui/ui-bridge-native';
162
+
163
+ const segments = useSegments();
164
+ useRouteAwareness(
165
+ { pattern: expoRouterPattern(segments), patternSource: 'router' },
166
+ { unmatched: isExpoRouterUnmatched(segments) }
167
+ );
168
+ ```
169
+
170
+ The rules, and a React Navigation example: [Route Awareness in the React Native / Expo guide](https://qontinui.github.io/ui-bridge/docs/guides/mobile#route-awareness).
171
+
155
172
  ## Element Types
156
173
 
157
174
  - `button` - Pressable buttons