react-router-native icon indicating copy to clipboard operation
react-router-native copied to clipboard

Is it possible to use es6 class syntax for component definition?

Open xahon opened this issue 7 years ago • 0 comments

Can i rewrite that

const HomeHeader = withRouter((props) => {
  const handleRightButtonPress = () => {
    props.router.push('/detail/gray');
  };

  return (
    <Header
      {...props}
      style={{ backgroundColor: '#26BBE5' }}
      title="Feed"
      rightButtonText="Gray"
      onRightButtonPress={handleRightButtonPress}
    />
  );
});

as es6 class?

xahon avatar Jul 10 '17 07:07 xahon