using React.DOM in react-native code..


(Sahas ) #1

I’m just getting started with react-native Android app. I want to use React.DOM instead of using .jsx code.

For example instead of below .jsx syntax, I wanted to use React.DOM wrapper.

  render: function() {
    return (<View style={styles.container}>
          <Text>
            This is React-Native
          </Text>
        </View>)
  }});

The moment I added var DOM = require(‘react-dom’) , I started seeing error
"Requiring unknown module “react/lib/ReactDOM”. If you are sure the module is there, try restarting the packager"

I rebuilt, redeployed, restarted the dev server… no luck, not sure how to get this package bundled across… appreciate any suggestions.

Thanks !