Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davesnx opened this issue Jan 17, 2024 · 0 comments

Comments

@davesnx
Copy link
Member

davesnx commented Jan 17, 2024

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.

@davesnx davesnx changed the title server-reason-react doesn't generate makeProps server-reason-react doesn't generate makeProps (so interface files aren't correct) Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant