Comments (4)
Got it sorted. If you want this to be part of the final API, I did it like this: v2.0...twistle:v2.0
My register wrapper function ends up looking like:
function registerWrappedComponent(screenID, generator) {
const generatorWrapper = () => {
const InternalComponent = generator();
return class extends Screen {
static navigatorStyle = InternalComponent.navigatorStyle || {};
static navigatorButtons = InternalComponent.navigatorButtons || {};
constructor(props) {
super(props);
this.allProps = {
...props,
...PropRegistry.load(props.screenInstanceID),
};
}
render() {
return (
<SuperProvider store={store} i18n={i18n}>
<InternalComponent navigator={this.navigator} {...this.allProps} />
</SuperProvider>
);
}
};
};
Navigation.registerScreen(screenID, generatorWrapper);
return generatorWrapper;
}
from react-native-navigation.
I agree @smooJitter . I think changing the API to require a factory method instead of a screenID would be better, and MUCH more flexible (instead me creating the Screen, you create it for me - the way you want).
from react-native-navigation.
I'm working through this. Merely exposing it is not good enough. Currently getting a message:
Super expression must either be null or a function, not undefined.
from react-native-navigation.
I'm anticipating the same problem. In addition to the language api, I'm going with.
.
I've always thought tucking away redux provider was constraining.
I plan to use your solution. Thanks.
Neverless, perhaps there should be a way to configure the redux provider without tampering with package files. I'm not sure how that will work
from react-native-navigation.
Related Issues (20)
- View not rendered on iOS
- React Native 0.73 `npx rnn-link` doesn't work HOT 10
- React Native 0.73.0 New Architecture Regression HOT 1
- Slow navigation HOT 1
- Text in bottom bar is cut off in ipad HOT 1
- RN 0.73 Support HOT 1
- RightButtons jumps on Android HOT 2
- AppDelegate.m build error: "No visible @interface for 'RCTBundleURLProvider' ..."
- [Epic] React Native 73 Support HOT 3
- [RN73] Support for Android
- [RN73] Support for iOS HOT 35
- [RN73] Documentation alignment
- [RN73] Internal rollout
- [RN71-IOS] - Got a blank screen after setRoot()
- react-native 0.73.2 project getting com.appName.mainActivity can not be cast to com.reactnativenavigation.NavigationActivity HOT 9
- [Android | iOS] componentDidDisappear's performance is inconsistent in Android and iOS when App slides to background
- Event RNN.ComponentDidAppear called before render screen component when animations.showModal.enabled = false
- Header Style Shadows warnings can't be disabled
- Android - Left buttons are not in order
- Android Regression RN 0.73 - `onDropViewInstance` not called anymore, View not cleaned up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-navigation.