react-native-gifted-form
react-native-gifted-form copied to clipboard
Is there a way to fully use this package without ExNavigator?
I'm looking to integrate with ExNavigation
+1
+1
+1 : It'd be great if we don't have to use ExNavigator, I'm using another navigator lib. Thanks.
WIP fork without ExNavigator here: https://github.com/ofaltins/react-native-gifted-form
Using the React Native Modal component instead of ExNavigator. Btw @elie222 the example is now running with Exponent - FYI just in case you're using it with ex-navigation.
+1
I managed to rip out ExNavigator and replace it with React Navigation, without modifying the core components. (It would have been much neater and cleaner if I did).
It wasn't too bad - the only problem is React Navigation doesn't have dynamic routes, so I needed a special, parameterised screen for all the modals. My basic navigator looks like this:
const RootNavigation = StackNavigator({
DemoScreen: {
screen: Example
},
MyModal: {
screen: MyModal
}
});
I then define the modal component:
class MyModal extends React.Component {
static navigationOptions = ({ navigation }) => {
return {
title: navigation.getParam('getTitle')(),
headerLeft: (
<Button
onPress={() => {
navigation.getParam('onClose')(null, navigation);
}}
title='Back'
/>
),
headerRight: (
<Button
onPress={() => {
navigation.getParam('onClose')(null, navigation);
}}
title='Save'
/>
)
};
};
render() {
return this.props.navigation.getParam('renderScene')();
}
}
and make sure I use it by modifying the prop on GiftedForm
:
openModal={route => {
this.props.navigation.push('MyModal', route);
}}
You can find the complete modification of the example app here.
WIP fork without ExNavigator here: https://github.com/ofaltins/react-native-gifted-form
Using the React Native Modal component instead of ExNavigator. Btw @elie222 the example is now running with Exponent - FYI just in case you're using it with ex-navigation.
hello
how to move from original or to you edit ?
thnx