Skip to content

server-reason-react doesn't generate makeProps (so interface files aren't correct) #112

@davesnx

Description

@davesnx

makeProps is a function generated by reason-react-ppx, to enable the right integration with React.js props. Props are objects in JS, while labelled arguments in Reason.

makeProps is the function that transforms props to labelled arguments, and it's called on the expression (where the [@jsx] is).

In server-reason-react-ppx we don't have this limitation on objects, since we don't transform the let make into anything else, just a function with labeled arguments (where we add the key).

This has a few limits from server-reason-react:

  • Users can't use makeProps directly on the server
  • Interfaces won't match if you share .rei files

Just opening the issue to see if there are methods to fix the general problem, but I'm not very optimistic about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions