3
头图

React-Native and Flutter

The thing is like this, because I want to be an APP recently, so I considered the technology selection, and took a look at gitHub, so I found a point that surprised me:

React-native warehouse

Flutter warehouse

As you can see, the FLutter Star silently greatly exceeds React-Native

I feel that the community has gradually reduced its attention to React-native and Flutter recently, and few people write related articles.

Comparing recruitment fever

  • React-Native:

    • Pass url transfer test of Boss directly hired by 061127155debf9, and the number of recruitments for React-Native

      https://www.zhipin.com/c101280600/?query=react-native&page=9&ka=page-9

  • Flutter:

    • Passed the Boss directly hired by url , the number of recruitments for Flutter

      https://www.zhipin.com/c101280600/?query=Flutter&page=8&ka=page-8

Recruitment fever: comparable

Recruitment

  • react-native

  • Flutter

  • The two are on par

gitHub ecology

  • react-native keyword search: 259K number of warehouses

  • Flutter keyword search: 275K number of warehouses

  • Students who say that the react-native ecology is much more mature than flutter should pay attention. Maybe this sentence is going to be a question mark now.

My comprehensive consideration

  • The cost of learning flutter lies in the use of dart language, in fact, the cost is not very high, just put it on me to learn, the price is not high
  • Flutter's domestic benchmarking products generally have some experience, interaction, and compatibility issues in the feedback from friends around them.
  • Due to the need to quickly implement trial and error, react-native was finally selected as the technology stack selection

    In the initial stage of a product, product demand should be fulfilled quickly, and the next step can be made after seeing how the market responds.

React-native environment construction (mac computer)

  • Ready to work

    brew install node
    brew install watchman
    npm install -g yarn
    yarn config set registry https://registry.npm.taobao.org/
  • Install xcode on your computer
  • Computer installation simulator

    sudo gem install cocoapods
  • Initialize the project

    npx react-native init AwesomeProject
  • Startup project

    cd AwesomeProject
    yarn ios
  • If you encounter homebrew in updating..., you can find a solution under Baidu, and the environment is still very fast. pod install remember to open the ladder when you execute 061127155df227
  • Such a simple react-native project is built

    If you encounter environmental problems, you can chat with me privately on the official account or WeChat

Learn the correct posture of flutter

  • Official website:

    https://flutterchina.club/
  • Mac environment installation

    https://flutterchina.club/setup-macos/
  • According to the actual operation of the document (some big guys complain that the document is bad, but it just reflects a point, which means that the big guy also read the document and read it carefully, so Xiaobai should look at it seriously, otherwise, how do you know that it is bad?)

The difference between the two

  • This article is very well written, the difference between the two, here are some of them, so I won’t repeat it. If you want to compare in depth, it may be a long discussion.
https://www.jianshu.com/p/da80214720eb
  • Some comparisons of data:

  • Comparison of principles (most important):

    • React Native is a set of UI frameworks. By default, React Native will load JS files under Activity, then run in JavaScriptCore to parse the Bundle file layout, and finally stack a series of native controls for rendering.
    • Simply put, it is to configure the page layout by writing JS code, and then React Native will finally parse and render into native controls.

  • In Flutter, only the platform provides a Surface and a Canvas, and the rest of Flutter says: "You can lie down, let's move by ourselves".
  • The vast majority of Widgets in Flutter are platform-independent. Developers develop apps based on Framework, and Framework runs on Engine, which is adapted and supported across platforms by Engine. This cross-platform support process is actually to "dataize" the Widget in the Flutter UI, and then draw it directly to the screen through Skia on the Engine

  • For the rest, please see the recommended articles above

Although I chose React-native, but you may not

  • I used to reject Flutter very much, but now that we use data to speak, it has been accepted by the public, and it may have a wider range than react-native. If conditions permit, you can use flutter

By the way

  • Don’t learn from me, read my entire article react-native and flutter which will be bigger and hump for a while, and naming should be standardized (mainly because Mac keyboards are difficult to use for you to understand~)
  • If you don’t standardize case naming, you will encounter the following situation
  • I’ve met many colleagues and fans asking me why I’m okay with building locally, but it fails when I log on to the server, and I can’t find the file name~ That’s because your capitalization is not standardized, and the rules of different operating systems are different, and the final build is The results are also different, so it is recommended to use react-native to order instead of capitalization

    Digression

  • The battle between react-native and flutter may have to enter the pk level such as vue and react
  • Last week’s public account voted, and nearly 400 people voted. In the end, React won with a small advantage. This shows that both frameworks are used a lot in China. Although I am a crazy fan of React, I also like the author of vue, which is not conflict

    After watching two things

If you think this content is very inspiring for you, I would like to invite you to help me with a few small things

1. Click "Watching, Like, Follow", so that more people can see this content (click "Like", bug -1 😊)

2. Follow my public "161127155df7b1 Front-end pinnacle", let me continue to push selected good articles for you

I am Peter Tan, a front-end development engineer in a small factory. I like to do architecture, and I have a certain research on performance optimization and cross-platform development. I also like to do self-media and blockchain. Welcome to follow me


PeterTan
14.4k 声望30k 粉丝