Skip to content

Instantly share code, notes, and snippets.

@topherPedersen
Created August 5, 2022 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topherPedersen/803bb27a806b846a1bb8a3c6fd163750 to your computer and use it in GitHub Desktop.
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
//
// 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