Show HN: React Native Express – Learn React Native Through Interactive Examples
reactnativeexpress.com
reactnativeexpress.com
Or is this tutorial sufficiently stand-alone without React (web) experience?
One should be able to learn React Native directly through this tutorial, without starting with React for web. The main prerequisite is ES5 JavaScript. The tutorial makes analogies to HTML/CSS/React and other web technologies, but these aren't crucial to understanding the material.
Ideally web is just another taraget :) https://github.com/necolas/react-native-web
That said, while writing a website with react-native-web is potentially interesting for new sites, it can be less worthwhile for an existing site to just embed a little bit (which is one of the huge values of React). It's also still very experimental. But I suspect it will be supported in a huge way soon.
You're correct that there's no theoretical reason that RN apps can't run on the web; as dabbott mentions, react-native-web is one third-party attempt at this. We'd like to support this officially one day but don't currently have a high-quality solution we can recommend.
I haven't gone through (or really looked in-depth) this tutorial, but I can say that the ES{x} features are pretty easy to grok once you've seen and written them a few times. Most of the syntax specifics are easy to pick up just by reading code. The biggest things I'd focus on for starting into RN is:
- React lifecycle (componentDidMount, willUnmount, shouldComponentUpdate, etc) - Add render counts into your debug builds so you know if components are re-rendering way more than they should (shouldComponentUpdate is your friend here).
Other than that, learn by building. Keep an open mind to frustrations since RN changes rapidly, and the documentation/examples/libraries online are not the most up-to-date.
I did find the You Don't Know JS[0] book series extreamly helpful as a C++/Python coder who has only done enough JS to get by. But that is the extent of my prep for learning React Native.
Interestingly, the YDKJS author (Kyle Simpson) is very down on the adoption and heavy usage of ES6 class notation and the over-reliance of the syntactic appearance of a OO-language class systems in JS.
His argument is the abstraction will leak the in-its-own-right powerful delegation system of JS prototypes, so why not just learn/use raw objects or his OLOO (objects-linked-to-other-objects) pattern.
I find it hard to mentally map the ES6 class to the equivalent object+prototype structure it is syntax sugar for, so just throw my hands up and for the most part pretend they are Python style open-objects.
[1] http://survivejs.com/react/implementing-kanban/react-and-flu...
Thanks for sharing your work!
I'm already familiar with native coding, but not sure how much better RN is than say PhoneGap.
The React way of managing views makes a lot of sense - change a variable and the whole UI updates accordingly. Also, rather than going through the typical debug, modify code, recompile cycle, there is a Hot Reload mode in RN where your code updates are immediately applied when you save. Laying the UI out with RN's CSS-style syntax is a lot easier than doing it by hand or mucking with Interface Builder / Android XML files. There is a lot that RN wraps around that gives easier management of than the native approach to, e.g. a BackButton component vs. dealing with a stack of Android fragments.
I haven't done any PhoneGap programming, the lack of native UI always scared me off. Without that, I never felt like I could hit a level of polish that was acceptable. The nice thing with RN is you can build you own native components and access native functionality as needed. It's not super well documented, but powerful when you need it.
The compiled output starts out awesome with the first few sections, and then just gets tedious and weird.
Maybe a more fair comparison is to IBM's CloudantSync[0] which is the managed service version of Couchbase compliant Cloudant.
[0] https://developer.ibm.com/clouddataservices/offline-first/
The biggest pain point so far is adding analytics but otherwise, everything is pretty smooth sailing.
Also I come from a web developer background, so structuring layout isn't too unfamiliar. AMA if you have any qns. I'm looking to pour all these experiences into a blog post before my next distraction comes and terrorizes my short-term memories
SCRIPT438: Object doesn't support property or method 'findIndex'
File: bundle.js, Line: 2, Column: 26381Question - is it possible to make a third-party keyboard in react native currently (the kind you download an install from the app store)?
Hope it saves you some time!
Another fix: In Redux Minimal example types.INCREMENT is defined at the top but then never used.