-
Notifications
You must be signed in to change notification settings - Fork 115
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
[RFC] Add jsx pragma integration #169
Comments
@rams23 this is a really interesting approach, thank you for investigating and trying stuff out. Last time we explored this, we were looking at a possible Babel plugin but I quite like the JSX pragma idea. We'll be exploring this further! |
Thanks for the fast reply @jalada . I'll let you know what I can find and maybe submit a PR. |
For anyone coming to this; see my comment on the PR for an update! |
that's a great idea @rams23
|
@orizens agreed, no reason why not. I'd really love one day for React Native to support querying for elements in the tree with the |
Hi.
First of all thank you for the cavy library. I started using it and I was thinking if can be possible to reduce the normal code impact, removing wrap functions, useCavy, HOC etc with a jsx pragma that replaces createElement with a simple wrap.
I already executed some test and created a custom jsx function like this:
this way the code stays clean but cavy still works and can also wrap components automatically.
I was also trying to configure @babel/plugin-transform-react-jsx to automatically inject the pragma with no success but i thing it can be feasible. The solution with the eplicit jsx pragma already works.
What do you thing?
The text was updated successfully, but these errors were encountered: