Created
August 5, 2022 16:26
-
-
Save topherPedersen/803bb27a806b846a1bb8a3c6fd163750 to your computer and use it in GitHub Desktop.
Blog Post Embed (RNNUtility.m): A Working Example of React Native Navigation External Components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RNNUtility.m | |
// yourapp | |
// | |
// Created by Christopher Pedersen on 8/5/22. | |
// Copyright © 2022 Super Sweet Co. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <ReactNativeNavigation/ReactNativeNavigation.h> | |
void registerExternalComponent(NSString *componentName, UIViewController *viewController) { | |
[ReactNativeNavigation | |
registerExternalComponent:componentName | |
callback:^UIViewController *(NSDictionary *props, RCTBridge *bridge) { | |
return viewController; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment