S
S
sinevik2018-05-31 14:31:52
React
sinevik, 2018-05-31 14:31:52

Is it possible to run 2 functions in props of a component?

<Button
                  style={styles.addFotoBtn}
                  onPress={() => Actions.CheckIn(); () => this.props.onModalOut() }
              >

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Suntsev, 2018-05-31
@sinevik

<Button
     style={styles.addFotoBtn}
     onPress={this.handleOnPress}
>

in the class a new method that combines both
handleOnPress = () => {
    Actions.CheckIn(); 
    this.props.onModalOut()
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question