4 ms·
Out of curiosity, what are you using instead of JSX? Plain `React.createElement()` calls, `createElement` aliased to a shorter variable like `e`, or something
by acemarke 8y ago
Out of curiosity, what are you using instead of JSX? Plain `React.createElement()` calls, `createElement` aliased to a shorter variable like `e`, or something like the `react-hyperscript-helpers` library?
- spiritcat 8y agoit's funny how originally jsx is what kept me away from react, and now it's what keeps me from leaving.
- interlocutor 8y agoYou can actually leave react and still keep JSX. This tiny library lets you use JSX as a templating mechanism: https://github.com/wisercoder/uibuilder https://github.com/wisercoder/uibuilder
- kibibu 8y agoIt's funny how everybody hated E4X when Adobe and Mozilla were doing it, and love JSX now.
- spiritcat 8y agoI didn't even know this existed.
- DougBTX 8y agoWe’re still using https://www.npmjs.com/package/react-dom-factories https://www.npmjs.com/package/react-dom-factories for plain DOM elements, so code looks like dom.div({ props }, ...) For our own components, we export the output of React.createFactory https://reactjs.org/docs/react-api.html#createfactory https://reactjs.org/docs/react-api.html#createfactory rather that the component itself, so rendering code looks like: MyComponent({ props }, ...) I realise that both of those are marked legacy, with a nudge towards using JSX instead, but they are pretty thin wrappers around createElement so it seems like a small dependency.