expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
30 lines (28 loc) • 701 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "internalNavigationEvents", {
enumerable: true,
get: function() {
return internalNavigationEvents;
}
});
const subscribers = {
actionDispatched: new Set(),
routePreloaded: new Set()
};
const internalNavigationEvents = {
addListener (name, callback) {
subscribers[name].add(callback);
return ()=>{
subscribers[name].delete(callback);
};
},
emit (name, event) {
for (const callback of subscribers[name]){
callback(event);
}
}
};
//# sourceMappingURL=internalNavigationEvents.js.map