Re:Proton Native – React Native for the desktop
by diroussel on Thursday May 03, 2018 @01:57AM
(#16983648)
Can you have higher order components? In react this is a function that returns a component, often taking another component as a parameter.
What's nice about react is that the JSX syntax is just sugar that converts to function calls.
Re:Proton Native – React Native for the desktop
by jcelerier on Thursday May 03, 2018 @04:49AM
(#16984340)
> Can you have higher order components? In react this is a function that returns a component, often taking another component as a parameter.
The standard way to do this in QML is using the Loader object: http://doc.qt.io/qt-5/qml-qtqml-component.html
You can also go full-eval of course: http://doc.qt.io/qt-5/qtqml-javascript-dynamicobjectcreation...
Re:Proton Native – React Native for the desktop
by profalseidol on Wednesday May 02, 2018 @10:04PM
(#16982819)
So nice not so see any < > and ( ) all over the place in addition to { }.
(Think of an Item as a visual component, which can either be referred to by an id or, as I've done here, referred to by its children as "parent".)
The text will update every time you click the button.