Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elloramir/reactopus

An uncomplicated React environment. Single library file for transpiling in runtime
https://github.com/elloramir/reactopus

jsx react transpiler

Last synced: 3 days ago
JSON representation

An uncomplicated React environment. Single library file for transpiling in runtime

Awesome Lists containing this project

README

        

### What is this and why?

I’ve created a simple environment to use React with just one library, addressing the frustration many face. React feels complicated for newcomers, not due to difficulty but because setting it up is chaotic. Originally an internal Facebook project, React wasn’t designed for public use and still carries that baggage. My solution simplifies React’s setup, making it approachable and almost like "vanilla" JavaScript.

### How can we achieve this?

1. Eliminate Babel: We need to transpile code ourselves, as Babel is bloated and unnecessarily large for this purpose.
2. Add module syntax support: This is essential for organizing and modularizing JSX applications effectively.
3. Extract JSX from script tags: We need a mechanism to handle inline JSX or external sources specified with src attributes.

```html

const App = () => (
<h1>Hello World</h1>
);

// Create root component
ReactDOM.createRoot(document.getElementById('root')).render(<App />);

```