SolidJS is the framework known for its performance (based on the js framework benchmark project). react2solid is an attempt to create a React to Solid code converter.
This project has 5 sub-projects or modules:
- Language agnostic React to Solid transformer rules and test cases
- ReactJS to SolidJS transpiler - JavaScript frontend
- React to Solid converter - CLI version, for batch conversion
- React.js to Solid.js transformer rules builder - Web UI
- Automatic ReactJS to SolidJS migration guide - from the transformer rules
ReactJS to SolidJS Converter & Utilities
Started with swc, JMESPath and Rust in mind, but had to switch to the Babel, jq and SolidJS due to multiple challenges (such as 1, 2, 3). Now, an MVP is ready without CLI.
- Idea is to avoid hardcoding of parser rules
- Create language agnostic transpiler rules using
jq
selectors and also keep test case scripts along with that - Using Babel, get AST for the ReactJS code
- Apply
jq
selection on the AST - Convert the AST to JavaScript/SolidJS
- For string transformer, it is merely string replace over the code (no AST conversion)
schwartzworld
of Hacker News for suggesting SolidJS hackathon- @ryansolid for creating SolidJS and the awesome community (especially Discord)
- v0.0.1
- Basic folder structure and naming conventions for the transform rules
- ReactJS to SolidJS transpiler - JavaScript frontend
- Builder UI (partly)
- Automatic migration guide generation
- ReactJS to SolidJS libraries alternatives (MVP, not handled in code)
- v0.0.2
- Refactor for code duplication and TOML structure
- v0.0.3
- Rust-based converter. Switch to swc?
- Feel free to post any issues or suggestions
- Submit your transform rules using the builder (TODO. Till then feel free to submit PR)
Hire Me, Recommend Me for any remote/freelancer opportunity
Contact Email: rrjanbiah-at-Y!com
Twitter: @rrjanbiah (DM open)