Skip to content

Commit 62ed2f4

Browse files
committed
Add comment
1 parent dc06296 commit 62ed2f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/setup/hybridApp/index.native.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ if (CONFIG.IS_HYBRID_APP) {
3030
// eslint-disable-next-line @typescript-eslint/unbound-method
3131
const originalAddEventListener = Linking.addEventListener;
3232

33+
// We wrap the original addEventListener to parse the URL before passing it to the handler.
34+
// This simplifies usage of the Linking module all over the app.
3335
Linking.addEventListener = (type: 'url', handler: (event: {url: string}) => void) => {
3436
const handlerWithParsedHybridAppUrl = (event: {url: string}) => {
3537
const transformedUrl = parseHybridAppUrl(event.url as HybridAppRoute | Route);

0 commit comments

Comments
 (0)