辛宝Otto

辛宝Otto 的玄酒清谈

北漂前端程序员儿 / 探索新事物 / Web Worker 主播之一/内向话痨
xiaoyuzhou
email

Quickly browsed the official website of React Native

  • [[Quick access to the React Native official website]]
  • [[Text course: Practical course on the new architecture of React Native]]
  • [[Quickly browsed through the official website of React Native]]

Quickly browsed through the official website of React Native

Happy Dragon Boat Festival. I quickly browsed through the official documentation of React Native during the holiday and would like to share my thoughts.

Background#

Due to my current work, I am dealing with some logic related to updating uni-app x to iOS. I am not sure how much uni-app x has evolved, so I wanted to take a look at the cross-platform solutions on the React side, which is undoubtedly the first choice: the official website of React Native. To avoid forgetting, I summarized some notes, [[Quick access to the React Native official website]]. I won't publish the article as it consists of fragmented notes; here, I will compare uni-app x and share my insights.

Visit React Native · Learn once, write anywhere

image.png

Website Reading Experience#

As a beginner, I have looked at the official websites of Flutter/Android/Swift, and I wanted to see how to quickly get an app running from a pure beginner's perspective, and whether there are teaching guides. I feel these websites are average, but better than those of SpringBoot/MySQL, at least the aesthetics are modern.

Reading React Native was a bit better; from the overall structure, it still follows the major structures of technical websites: Guides, Documentation, API Index, and Playground Preview.

Quick Results#

Since there is no way to preview the client effect on the webpage, with the help of a shell app, namely Expo, you can scan a code to preview the effect anytime, which is very intuitive. The React Native technology now fully recommends the Expo framework, and even pure beginners can quickly start a demo application through npm command line, achieving local effects.

Interestingly, in the process of quickly getting started with development, there is no need to deliberately discuss Android Studio and XCode, which feels quite good, unlike Flutter, which discourages outsiders.

From a beginner's perspective, I think introducing a framework is very good; complex content can be put off for later, and when needed, it should be tackled seriously. Compared to uni-app x, because of HBuilderX, many concepts are inherently shielded, which can also be seen as a comparative implementation of frameworks.

Always remember that for beginners and new users, exposing parameters too early is not good; it's appropriate to shield details first, get things running, and discuss optimizations and advanced features later.

Systematic Learning for Enthusiasts#

In the Basic section of the Guide, only the most conventional concepts are introduced, which I think is correct.

After the basics, when it starts to systematically discuss, I think it's also good. From the perspective of the software development lifecycle, it gradually unfolds the environment preparation before development, overall workflow, how to layout pages, debugging, automated testing, performance tuning, etc. The unavoidable native interaction part also introduces NativeModules before continuing.

Unfortunately, as a novice, after reading, I still don't understand what the so-called Legacy structure and the new architecture are currently in terms of status; I couldn't grasp it. It seems that the architecture of RN has changed, but I didn't understand what transitional phase it is currently in.

Documentation Does Not Support Multiple Languages#

The official website does not support multiple languages, but I saw someone maintaining a Chinese website for RN, which is a community version.

React Native Chinese Website · A framework for writing native applications using React

I was afraid of outdated updates, so I didn't dare to look too much. Later, I clicked around casually, and it didn't seem very new. The author might be the one behind the Geek Time course, with course traffic and surrounding product traffic.

Thinking about it, not supporting internationalization is also the norm; only front-end related libraries tend to update internationalization more timely. Still, no one is working on the workflow.

Emphasizing Frameworks Rather Than Free Combinations#

I initially didn't realize that Expo is not officially released by RN. It is indeed like React, somewhat similar to the relationship between React and Next.js: encouraging the use of frameworks rather than assembling a bunch of configurations by oneself.

I only saw this when looking at the outdated Chinese documentation, which encourages the react-native-cli package. Currently, on the official website, you need to deliberately search to find the introduction entry. They earnestly recommend the framework, and if you insist on assembling it yourself, they have left a backdoor.

Entering the Expo official website, for example, if I want to use the native API for the camera, I can install a plugin to complete this, which is also an ecosystem, somewhat similar to Ionic. It provides a shell container and a plugin ecosystem.

Open Architecture#

The React Native official website only maintains Android and iOS platforms, while support for the web is maintained by the community and third parties. For example, Windows/MacOS is also community-maintained. Creating a new architecture has its traces.

However, I casually searched for React Native Harmony and found no results.

Additional Extensions#

I particularly like xlog. I observed that the client of xlog.app is also made using Expo, which is open source, and perhaps I can look into it further in the future.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.