News for hackers. Stuff that matters.
Re:Vue.js: the good, the meh, and the ugly by acemarke on Thursday July 05, 2018 @06:16PM (#17467327)
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?
Re:Vue.js: the good, the meh, and the ugly by DougBTX on Thursday July 05, 2018 @07:37PM (#17467801)
We’re still using 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 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.
Re:Vue.js: the good, the meh, and the ugly by spiritcat on Thursday July 05, 2018 @06:52PM (#17467543)
it's funny how originally jsx is what kept me away from react, and now it's what keeps me from leaving.
Re:Vue.js: the good, the meh, and the ugly by kibibu on Friday July 06, 2018 @02:12AM (#17469320)
It's funny how everybody hated E4X when Adobe and Mozilla were doing it, and love JSX now.
Re:Vue.js: the good, the meh, and the ugly by spiritcat on Friday July 06, 2018 @05:04AM (#17469977)
I didn't even know this existed.
Re:Vue.js: the good, the meh, and the ugly by interlocutor on Thursday July 05, 2018 @07:33PM (#17467775)
You can actually leave react and still keep JSX. This tiny library lets you use JSX as a templating mechanism: https://github.com/wisercoder/uibuilder