JSX is not the best solution, but if you really want it, I recommend trying $mol_jsx, which fixes most JSX problems:
✅ The component automatically tracks external states (not only inner state).
✅ Component parameters are updated without a parent re-render.
✅ Changing the callback does not result in a re-render.
✅ Our hook counterpart can be applied anywhere in the code, even in loops and conditions.
✅ For partial updates, you can create a component that accepts callback.
✅ Stateful components are fully controllable.
Thank you for the inspiration. We need an alternative to React. Something that uses JSX but without hooks. Instead it should use ES6 classes. /s
JSX is not the best solution, but if you really want it, I recommend trying $mol_jsx, which fixes most JSX problems:
✅ The component automatically tracks external states (not only inner state).
✅ Component parameters are updated without a parent re-render.
✅ Changing the callback does not result in a re-render.
✅ Our hook counterpart can be applied anywhere in the code, even in loops and conditions.
✅ For partial updates, you can create a component that accepts callback.
✅ Stateful components are fully controllable.
What??
Classes don't have good class in JavaScript. 😁
🤣