News for hackers. Stuff that matters.
Re:Use ReactJS to Build Native Apps by pbreit on Wednesday January 28, 2015 @02:33PM (#8961964)
So does it use PhoneGap or something like it?
Re:Use ReactJS to Build Native Apps by lucasmullens on Wednesday January 28, 2015 @02:38PM (#8962002)
No, because PhoneGap uses the DOM.
Re:Use ReactJS to Build Native Apps by zpao on Wednesday January 28, 2015 @02:43PM (#8962032)
No, it skips the DOM entirely and works with native elements (iOS views) directly.
Re:Use ReactJS to Build Native Apps by diverightin63 on Wednesday January 28, 2015 @02:51PM (#8962105)
This is where I get confused. How is it compiling to these elements?
Re:Use ReactJS to Build Native Apps by smadge on Wednesday January 28, 2015 @04:53PM (#8962792)
One possibility: You have a JS interpreter running your React code. You generate a virtual DOM and hand it off to React. React sends the virtual DOM through a message bus to native code. So far, nothing crazy here, this is how frameworks like cordova work. That native code dynamically translates the virtual DOM into native UI elements.
Re:Use ReactJS to Build Native Apps by eyko on Wednesday January 28, 2015 @04:13PM (#8962578)
That's the million dollar question and tomorrow we might get an answer.