Skip to content

[Discussion] React native without jsx #1474

@umhan35

Description

@umhan35

We can use react.js without jsx (http://facebook.github.io/react/docs/displaying-data.html#react-without-jsx), but there is currently no implementation for React.DOM in react native.

I have my own implementation now, which allows me to do the following thing in CoffeeScript:

{TouchableOpacity, View, Text} = DOM

...

    TouchableOpacity
      onPress: => @_onPress(event)
      View
        style: [{backgroundColor: event.backgroundColor}, ss.default]
        Text
          style: [s.textCenter, {color: event.textColor}]
          event.raw.description

I'd love to see react native being consistent with react by providing React.DOM or a better name than DOM?

I'd love to contribute this if we agree with this point (and I hope so). React.DOM will include all current components. And which folder should the React.DOM code go?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions