-
Notifications
You must be signed in to change notification settings - Fork 17
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
brisk-reconciler.ppx prevents usage of other standard JSX apis #56
Comments
Good point... There are no technical limitations. In fact, instead of:
People could type:
I like
The design is quite limiting. I wish there was a way to have different transforms. One (crude) solution would be to add |
I would strongly prefer Regarding children, I think 1-3 all have passable solutions with the standard treatment of children as a list.
|
The API currently used by brisk-reconciler is the most natural one to use. Especially with things like optional "render props". It just works intuitively. |
Yeah I do really like the API we have with this PPX, and it is natural to use! The unfortunate aspect is that it splits the Reason language. We can either use "Brisk JSX" or "Reason JSX". I don't think these conveniences warrant that split, but I understand other may disagree, which is fine. My ideal scenario would be to bring these improvements to Reason's JSX where possible, but that is probably a lot of work. In the meantime do you have any ideas how we could let the two kinds of JSX live side-by-side? |
|
@kyldvs I asked Revery users for feedback regarding the JSX ppx. We'll see what they say. The patch to change JSX in refmt would be very simple. I once implemented a related change quickly. What's more @IwanKaramazow and Antonio are very helpful with those changes. |
A scoped [@brisk.nojsx Pastel.(
print_endline(<Pastel color=Red> "Hello world" </Pastel>)
)]; Mixing several different kinds of JSX worries me, so it would be nice if "external" JSX code was clearly marked. |
I've noticed that the brisk-reconciler.ppx prevents using other JSX apis. I believe the ppx expects there to be a
make
function but the standard JSX api built in to reason uses acreateElement
function.This comes up when trying to use something like Pastel.
It also seems like the brisk reconciler ppx doesn't support list elements like normal Reason JSX:
Is it possible to have the ppx translate
let%component
to the standardcreateElement
form of JSX? Or is there some technical limitations around this?The text was updated successfully, but these errors were encountered: