Skip to content

Instantly share code, notes, and snippets.

@bhaskarmurthy
Last active October 30, 2020 13:56
Show Gist options
  • Save bhaskarmurthy/310de0d7e0ef72d5728389a408d3d3be to your computer and use it in GitHub Desktop.
Save bhaskarmurthy/310de0d7e0ef72d5728389a408d3d3be to your computer and use it in GitHub Desktop.
React Native notes

React Native principles

October 28, 2020

https://reactnative.dev/blog/2020/07/17/react-native-principles

  • Our top priority for React Native is to match the expectations people have for each platform. This is why React Native renders to platform primitives. We value native look-and-feel over cross-platform consistency.
  • In order to match the look-and-feel of native apps, we must also match their performance.
  • Great user experiences are created iteratively. It should only take a few seconds to seeing the result of code changes in a running app. React Native's architecture enables it to provide near-instant feedback during development.
  • Teams can easily leverage the fast-growing ecosystem of high quality open source packages. Teams can also share business logic between Android, iOS, and the web. This helps them ship updates faster and reduce organizational silos between platform teams.
  • Developers should be able to reach as many people as possible without being limited by device model or operating system.
  • We don’t believe in deploying the exact same user interface on every platform, we believe in exposing each platform’s unique capabilities with the same declarative programming model. Our declarative programming model is React.
  • React Native will continue to build on top of the innovations of React and remain at the forefront of the declarative user interface movement.

React principles

October 28, 2020

https://reactjs.org/docs/design-principles.html

  • The key feature of React is composition of components. Components written by different people should work well together. It is important to us that you can add functionality to a component without causing rippling changes throughout the codebase.
  • React is not a generic data processing library. It is a library for building user interfaces.
  • It is a key goal for React that the amount of the user code that executes before yielding back into React is minimal.
  • Providing a good developer experience is important to us.
  • When something goes wrong, it is important that you have breadcrumbs to trace the mistake to its source in the codebase. In React, props and state are those breadcrumbs.
  • This ability to trace any UI to the data that produced it in the form of current props and state is very important to React. It is an explicit design goal that state is not “trapped” in closures and combinators, and is available to React directly.
  • Being renderer-agnostic is an important design constraint of React
  • We prefer boring code to clever code. Code is disposable and often changes. So it is important that it doesn’t introduce new internal abstractions unless absolutely necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment