-
Notifications
You must be signed in to change notification settings - Fork 48.5k
Idea: Host codemods on the website #11080
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
Comments
Sounds fun. How do you see this in relation to reactjs/react-codemod? Does one link to the other? Or would we fork a few of the more common code-mods for this REPL? |
I imagined we'd somehow just run those in the browser. To be honest I didn't think how to do it 🙈 |
Fair! Seems like we could add the NPM I'd be happy to play around with this at some point. I enjoy REPL stuff. |
Another thing that's missing is HTML -> JSX converter. There is one at https://github.com/reactjs/react-magic/blob/master/README-htmltojsx.md but apparently it points back to our website which doesn't provide it anymore 😛 We should just host it and then link "Invalid prop className" warnings to it. |
There isn't actually one on our site: Let's just update the doc you're talking about to point to http://magic.reactjs.net/htmltojsx.htm so we don't need to continue to support the redirect? There's no reason for the react-magic docs to link to the React website to then redirect back to the react-magic website Edit I'll open a PR: reactjs/react-magic/pull/145 |
Sorry I didn’t clarify. I meant that I would prefer it to be an official tool, not just a volunteer-run project that breaks every time we do a release. Only then would I feel comfortable linking to it from the warnings. So I don’t mean just hosting it, but making it visible somewhere on the website (and not just if you know the link), and actually making it a solid official tool. Of course that would involve some work which we don’t currently have time to do. |
Well the PR I sent should pull us out of the loop so that it wouldn't break when we did future releases. |
Moved to reactjs/react.dev/issues/12! |
It would be nice to provide a REPL for codemods on the website, especially for createClass or PropTypes conversion. This is handy for one-offs like converting StackOverflow answers or fiddles, but also introduces people to the idea of codemodding in a playful way. The REPL can include instructions on running it locally on the bottom.
The text was updated successfully, but these errors were encountered: