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
Suggestion: drop dependency on React.createElement #207
Comments
Makes sense! I've wanted to keep it low-configuration with good defaults, but agreed that non-React JSX would be good to support. From the docs for https://github.com/Swizz/snabbdom-pragma, looks like I can probably just add a new option |
Snabbdom's a popular example, but there are many other projects too, so it might not be quite as simple as that, as you'd only be able to say you support projects that explicitly implement that feature. Keep the sensible default, I agree, but being able to optionally override the name of the factory function would allow everyone to use sucrase as-is, without bothering you about it, and without bothering the owners of whatever platforms they want to integrate with. Just my $0.02 :) |
Fixes #207 As with Babel, we assume the pragma is a dot-separated list of identifiers (or just an identifier), which we parse so that we can replace the base name if necessary.
Fixes #207 As with Babel, we assume the pragma is a dot-separated list of identifiers (or just an identifier), which we parse so that we can replace the base name if necessary.
Fixes #207 As with Babel, we assume the pragma is a dot-separated list of identifiers (or just an identifier), which we parse so that we can replace the base name if necessary.
Not sure if you're aware, but JSX is used for other projects too, such as virtual-dom, snabbdom, surplus and others. It would definitely be worthwhile making the element factory function configurable, rather than hardcoding it to React.createElement.
The text was updated successfully, but these errors were encountered: