Skip to content

Supporting other virtual doms. #55

@DylanPiercey

Description

@DylanPiercey

Currently it's pretty easy to use something like https://github.com/dekujs/deku using coffee-react since you can do:

# @cjsx deku
Car = React.createClass
  render: ->
    <Vehicle {...@props.parts}>
      <Parts.FrontSeat />
      <Parts.BackSeat />
      <p>Which seat can I take? {@props.seat or 'none'}</p>
    </Vehicle>

Which becomes:

`/** @jsx deku */`
Car = React.createClass
  render: ->
    deku.createElement(Vehicle, React.__spread({},  @props.parts),
      deku.createElement(Parts.FrontSeat, null),
      deku.createElement(Parts.BackSeat, null),
      deku.createElement("p", null, "Which seat can I take? ", (@props.seat or 'none'))
    )

However you will notice "React.__spread" which is obviously not compatible.
Is it possible to have @jsx also modify React.__spread?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions