Re:React Makes You Sad?
by sombremesa on Monday February 29, 2016 @01:24PM
(#11197092)
I just want to point out that there is no mandate to use a framework in JavaScript. While I'm not familiar with React and I agree that it probably helps developers structure their apps, there is no need to use a framework just to have a component/modular architecture.
One of my favorite examples of clean modular JS that does not depend on a framework is Mozilla's browserquest: https://github.com/mozilla/BrowserQuest/tree/master/client/j...
Many things that make life easier when making relatively small web apps also make debugging more complicated, compared to programming from scratch with minimal reliance on third parties. Choose wisely.
That doesn't work if you're trying to build native mobile apps.
Re:React Makes You Sad?
by Widdershin on Monday February 29, 2016 @02:33PM
(#11197676)
Which is a pity. I would love to see something like Electron for mobile.
Re:React Makes You Sad?
by notduncansmith on Monday February 29, 2016 @04:04PM
(#11198487)
I'm pretty sure that's exactly what the Cordova project is: https://cordova.apache.org
Cordova isn't purely native.
Either is Electron.
Re:React Makes You Sad?
by Omnipresent on Monday February 29, 2016 @12:53PM
(#11196901)
Can you provide more details about your path to learning JS and React?
Re:React Makes You Sad?
by saigrandhi on Monday February 29, 2016 @03:39PM
(#11198286)
What resources did you use to learn Javascript properly? I have been meaning to go through this book: http://eloquentjavascript.net/
> Even better, I can now create both iOS apps and Android apps at the same time
Are you referring to native apps, or do you mean by making a Web app with React you don't need to make native apps?
Re:React Makes You Sad?
by squeaky-clean on Monday February 29, 2016 @02:19PM
(#11197546)
React Native [0]. Your view-specific code still has to be done per-platform, but your core logic can be shared, and all of it is written with Javascript using React as the framework. The JS creates and controls native elements, with the native parts mostly abstracted away.
Exactly this, made even simpler by the naming scheme that lets you have iOS and Android versions of the same component.
You can write much view code in a way that abstracts over the DOM/Native platform, too, using standard abstraction techniques.
I'm referring to native apps on iOS and Android as the code commonality is huge, with just a small number of platform specific components. The biggest surprise though was how much I could port out for a web version (and Electron based Windows and Mac applications)
React itself is allowing me to write web applications faster and with less bugs, primarily because of the unidirectional information flow, but also because of the way it guides you into making everything components, which keeps the borders up between objects and makes testing easy.
Even better, I can now create both iOS apps and Android apps at the same time (I knew Objective C but not Java for Android), and at a much faster speed than before - the flex layout model alone has saved me days and weeks of debugging the iOS layouts in storyboards, and now I'm able to shift code between the app codebase and the web codebase with ease.
It is indeed overwhelming when first trying to learn React, especially when trying to learn Javascript at the same time, and this flowchart is so spot-on with the tendency to start using packagers, boilerplate, redux before understanding why they are useful.
Follow the flowchart, and you will find happiness!