One month with React Native
whitesmith.co
whitesmith.co
I don't think all projects should be done with it as native development still has its place for certain kind of apps, but for a typical thin-client app wrapping a web service, it's really great.
What I wish to exist is something like Kotlin with react-native like library, with single good cross-platform library of components and good solid tooling.
Facebook developers are awesome, but they are paid for Facebook apps, not for making good library, IMO, good library is just a by-product which they kindly shared and it feels everywhere.
Overall I think React Native is the best cross-platform solution out there. It doesn't carry overhead of bundled HTML webview, its view is advanced enough for complex GUI, it provides smooth animations and React is something very interesting actually. Also you can push updates without app-store approvals, if I got that right (I'm not sure about Apple). For apps built in haste with multiple bug-fixes every hours it's important.
Disclaimer: I work on React Native, react-navigation, etc @ Expo (expo.io)
isn't Reason supposed to fill this role?
AirBnB just started working on one too that seems promising, but it's not ready for primetime yet.
What about using Visual Studio Code with the compiler set on 'checkJs'? I've just started using TypeScript and I don't think I can ever go back to raw JS.
How can you possibly know _in advance_ if a prop will be needed outside a certain component (you haven't written yet) or not? This seems to imply a suggestion to completely architect the entire app (what components exist, how they relate) before you write much code. And then somehow being correct, even as you develop the app and add new features etc.
I haven't done anything with React Native, and am only a beginner at web React, but this kind of data management architecture has definitely been one of my biggest challenges. I find it hard to change things once they're there, but hard to know what should be there up front.
In engineering, that's what we call the design phase.
http://redux.js.org/docs/recipes/reducers/BasicReducerStruct....
Here are a few gotchas to avoid:
1. Define your state shape in terms of your domain data and app state, not your UI component tree.
2. Your reducers do not need to have a 1 to 1 mapping to actions. If you need to fire multiple actions to change the data you need then rethink your reducers.
I'm not sure that's what OP is recommending though? In fact, that redux doc seems to me to making an opposite suggestion to the OP -- it seems to be suggesting you should put domain data, app state, and UI state all in the store, but "define your state shape in terms of your domain data and app state, not your UI component tree." OP seems to recommend trying ot keep app state and UI state _out_ of the store if you can.
I think people in practice have a lot of trouble with this, and making it successful, even after experience.
But apparently a lot don't too?
It has the best React support ever since React existed, and every IDE feature imaginable. And also, its basically the same IDE as Android Studio, so a very small step for a App programmer.
Related: I would highly recommend trying out/using Expo.io if you are new to React Native and just want to get something working incredibly fast/easy to "hack" around with. It's a fantastic wrapper around React Native to jumpstart the whole dev experience.
They make heavy use of structures in native memory for argument-passing between JavaScript and Java. Once again someone thought they could outperform the JVM with their C-skills. My critique was dismissed :-/
Even though I showed that giving up RN's native memory and just sending serialised Json-Strings on the Heap over the bridge is 50-100% faster (and doesn't interfere with GC, so it should have less lags as well): [1]
The image library they use, Fresco, does the same. There are many year-old bug-reports open regarding OutOfMemory-errors and crashes, and RN apps tend to get unstable with more images. My bug-report [2] was dismissed as well without proper explanation.
But: At least some guy or girl didn't have to give their custom code up for to the better JVM. scnr
I use Strings for arguments in production and it's faster, so maybe try that out. :)
[0] https://github.com/facebook/react-native/issues/8780
We are using a local database as a mirror for offline use, which is a key requirement. Profiling (a forgotten art nowadays) shows that most time spent during queries is in this bridge and not in the actual queries.
Have you tried appending '... LIMIT <count> [OFFSET <skip>]' to constrain the per-query result set to a reasonable size?
The official documentation is a good place to start.
The Facebook React Native group is also a great resource.
Judging from the table of contents, it seems the book gets into more depth than what else is out there.