Add new React function component jsx ppx #3452
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See reasonml/reason-react#351 for corresponding React changes.
This (re)introduces jsx version 3 and allows people to default their entire project to the new version through a ppx. When using version 3, jsx compiles into something very similar to JS - React.createElement(component, props, ...children). This gets us a 0-cost, 0-runtime binding for React.
Tested in a local repo with all combinations of (None, Some 2, Some 3) in bsconfig.json and in bs.config attribute.