react-native-gifted-form icon indicating copy to clipboard operation
react-native-gifted-form copied to clipboard

Is there a way to fully use this package without ExNavigator?

Open elie222 opened this issue 8 years ago • 7 comments

I'm looking to integrate with ExNavigation

elie222 avatar Nov 14 '16 10:11 elie222

+1

Marquis-H avatar Nov 18 '16 08:11 Marquis-H

+1

okbody39 avatar Dec 07 '16 07:12 okbody39

+1 : It'd be great if we don't have to use ExNavigator, I'm using another navigator lib. Thanks.

ngduc avatar Dec 28 '16 16:12 ngduc

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.

ofaltins avatar Feb 21 '17 19:02 ofaltins

+1

tharindu991 avatar Sep 01 '17 09:09 tharindu991

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.

jonmountjoy avatar May 25 '18 12:05 jonmountjoy

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

Q8hma avatar Dec 16 '18 17:12 Q8hma