|
|
|
|
|
by timofei7
2752 days ago
|
|
it's worth reading up on what react-native is. it isn't "write once deploy anywhere," but rather "learn once, write anywhere." in essence it allows us to enjoy the fairly transformative one way state driven view paradigm (think functional) to write apps. that is the magical part of it - the one language multiple platforms aspect is a tertiary consideration in my opinion. the pleasure comes from an environment where code changes are almost immediately visable without a lengthy compile/run step, and the pure joy of having views that depend purely on state input without the mess of side effects. someday everyone will realize that one-way data binding is beautiful and that functional paradigms can save hours/days/weeks of testing and messiness. react-native is just bringing that beauty to the dev process now. i've done obj-c/swift xcode, and maybe i'm not good at it, but it ends up not being easy to read, and not fun waiting every time i want to test something for it to compile and run. under the hood react-native does something very clever, it isn't a hack or ugly, but rather quite lovely. you get the pleasure of seeing your components and data flow as a tree, a tree that only updates nodes as necessary when state changes, and where each component is a fully fledged native component with all the functionality and speed of the native component. want a UIScrollView? sure `<ScrollView></ScrollView>`. data is passed through easily and it is all very easy to reason about. that is the goal right? code that is easy to read and makes sense. |
|
I’ve been building in react for a year after working in iOS and Android. Something like a tree structure capturing all of the view components is available right out of Xcode. Another example: time saved compiling is mitigated by time spent debugging, trying to find the source of exceptions etc is a mystery box and a huge time suck.
What I think is happening is that most Javascript and react developers have spent time only in one domain. So they make a lot of assumptions that all of these advantages of react are exclusive to the paradigm and platform, when that’s not true at all.