You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/blog/2020-07-06-version-0.63.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ At the same time, we are dropping support for Node 8. [Its LTS maintenance cycle
136
136
137
137
Thank you to the hundreds of contributors that helped make 0.63 possible!
138
138
139
-
::note
139
+
:::note
140
140
Special thanks to [Rick Hanlon](https://twitter.com/rickhanlonii) for authoring the section on `LogBox` and [Eli White](https://twitter.com/Eli_White) for authoring the `Pressable` part of this article.
Copy file name to clipboardExpand all lines: website/blog/2024-10-23-the-new-architecture-is-here.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,17 +230,17 @@ Separating urgent events from transitions allows for a more responsive user inte
230
230
Here's a comparison of the old architecture without transitions and the new architecture with transitions. Imagine that each tile isn't a trivial view with a background color, but a rich component containing images and other components that are expensive to render. **After** using `useTransition` you avoid thrashing your app with updates and falling behind.
231
231
232
232
<divclassName="TwoColumns TwoFigures">
233
-
<figure>
234
-
<imgsrc="/img/new-architecture/without-transitions.gif"alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000." />
235
-
<figcaption><b>Before:</b> rendering tiles without marking it as a transition.</figcaption>
236
-
</figure>
237
-
<figure>
238
-
<imgsrc="/img/new-architecture/with-transitions.gif"alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000. There are less batch renders in comparison to the next video." />
239
-
<figcaption><b>After:</b> rendering tiles <em>with transitions</em> to interrupt in-progress renders of stale state.</figcaption>
240
-
</figure>
233
+
<figure>
234
+
<img src="/img/new-architecture/without-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000." />
235
+
<figcaption><b>Before:</b> rendering tiles without marking it as a transition.</figcaption>
236
+
</figure>
237
+
<figure>
238
+
<img src="/img/new-architecture/with-transitions.gif" alt="A video demonstrating an app rendering many views (tiles) according to a slider input. The views are rendered in batches as the slider is quickly adjusted from 0 to 1000. There are less batch renders in comparison to the next video." />
239
+
<figcaption><b>After:</b> rendering tiles <em>with transitions</em> to interrupt in-progress renders of stale state.</figcaption>
240
+
</figure>
241
241
</div>
242
242
243
-
For more information, see [Support for Concurrent Renderer and Features](/docs/0.75/the-new-architecture/landing-page#support-for-concurrent-renderer-and-features).
243
+
For more information, see [Support for Concurrent Renderer and Features](/architecture/landing-page#support-for-concurrent-renderer-and-features).
244
244
245
245
### Automatic Batching
246
246
@@ -249,19 +249,19 @@ When upgrading to the New Architecture, you will benefit from automatic batching
249
249
Automatic batching allows React to batch together more state updates when rendering to avoid the rendering of intermediate states. This allows React Native to be faster and less susceptible to lags, without any additional code from the developer.
250
250
251
251
<divclassName="TwoColumns TwoFigures">
252
-
<figure>
253
-
<imgsrc="/img/new-architecture/legacy-renderer.gif"alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI slowly catches up to rendering 1000 views." />
254
-
<figcaption><b>Before:</b> rendering frequent state updates with legacy renderer.</figcaption>
255
-
</figure>
256
-
<figure>
257
-
<imgsrc="/img/new-architecture/react18-renderer.gif"alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI resolves to 1000 views faster than the previous example, without as many intermediate states." />
258
-
<figcaption><b>After:</b> rendering frequent state updates with <em>automatic batching</em>.</figcaption>
259
-
</figure>
252
+
<figure>
253
+
<img src="/img/new-architecture/legacy-renderer.gif" alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI slowly catches up to rendering 1000 views." />
254
+
<figcaption><b>Before:</b> rendering frequent state updates with legacy renderer.</figcaption>
255
+
</figure>
256
+
<figure>
257
+
<img src="/img/new-architecture/react18-renderer.gif" alt="A video demonstrating an app rendering many views according to a slider input. The slider value is adjusted from 0 to 1000 and the UI resolves to 1000 views faster than the previous example, without as many intermediate states." />
258
+
<figcaption><b>After:</b> rendering frequent state updates with <em>automatic batching</em>.</figcaption>
259
+
</figure>
260
260
</div>
261
261
262
262
In the old architecture, more intermediate states are rendered, and the UI keeps updating even when the slider stops moving. The New Architecture, renders fewer intermediate states and completes the rendering much sooner thanks to automatically batching the updates.
263
263
264
-
For more information, see [Support for Concurrent Renderer and Features](/docs/0.75/the-new-architecture/landing-page#support-for-concurrent-renderer-and-features).
264
+
For more information, see [Support for Concurrent Renderer and Features](/architecture/landing-page#support-for-concurrent-renderer-and-features).
265
265
266
266
### useLayoutEffect
267
267
@@ -303,14 +303,14 @@ useLayoutEffect(() => {
303
303
This change allows you to read layout information synchronously and update the UI in the same frame, allowing you to position elements correctly before they are displayed to the user:
304
304
305
305
<divclassName="TwoColumns TwoFigures">
306
-
<figure>
307
-
<imgsrc="/img/new-architecture/async-on-layout.gif"alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The tooltip is rendered after a short delay after the view moves" />
308
-
<figcaption>In the old architecture, layout was read asynchronously in `onLayout`, causing the position of the tooltip to be delayed.</figcaption>
309
-
</figure>
310
-
<figure>
311
-
<imgsrc="/img/new-architecture/sync-use-layout-effect.gif"alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The view and tooltip move in unison." />
312
-
<figcaption>In the New Architecture, layout can be read in `useLayoutEffect` synchronously, updating the tooltip position before displaying.</figcaption>
313
-
</figure>
306
+
<figure>
307
+
<img src="/img/new-architecture/async-on-layout.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The tooltip is rendered after a short delay after the view moves" />
308
+
<figcaption>In the old architecture, layout was read asynchronously in `onLayout`, causing the position of the tooltip to be delayed.</figcaption>
309
+
</figure>
310
+
<figure>
311
+
<img src="/img/new-architecture/sync-use-layout-effect.gif" alt="A view that is moving to the corners of the viewport and center with a tooltip rendered either above or below it. The view and tooltip move in unison." />
312
+
<figcaption>In the New Architecture, layout can be read in `useLayoutEffect` synchronously, updating the tooltip position before displaying.</figcaption>
313
+
</figure>
314
314
</div>
315
315
316
316
For more information, see the docs for [Synchronous Layout and Effects](/docs/0.75/the-new-architecture/landing-page#synchronous-layout-and-effects).
@@ -379,7 +379,7 @@ If, for any reason, the New Architecture is not behaving properly in your applic
379
379
380
380
To opt-out from the New Architecture:
381
381
382
-
- On Android, modify the `android/gradle.properties` file and turn off the `newArchEnabled` flag
382
+
- On Android, modify the `android/gradle.properties` file and turn off the `newArchEnabled` flag:
Copy file name to clipboardExpand all lines: website/blog/2025-06-12-moving-towards-a-stable-javascript-api.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ tags: [announcement]
5
5
date: 2025-06-12T16:00
6
6
---
7
7
8
-
In React Native 0.80, we're introducing two significant changes to React Native's JavaScript API —the deprecation of deep imports, and our new Strict TypeScript API. These are part of an ongoing effort to accurately define our API and offer dependable type safety to users and frameworks.
8
+
In React Native 0.80, we're introducing two significant changes to React Native's JavaScript API —the deprecation of deep imports, and our new Strict TypeScript API. These are part of an ongoing effort to accurately define our API and offer dependable type safety to users and frameworks.
9
9
10
10
**Quick takeaways:**
11
11
@@ -17,13 +17,13 @@ In React Native 0.80, we're introducing two significant changes to React Native'
17
17
18
18
## What's changing and why
19
19
20
-
We are moving to improve and stabilise React Native's public JavaScript API —i.e. what you get when you import `'react-native'`.
20
+
We are moving to improve and stabilise React Native's public JavaScript API —i.e. what you get when you import `'react-native'`.
21
21
22
-
Historically, we've approximated this. React Native is authored in [Flow](https://flow.org/), but the community has long since moved to TypeScript in open source, which is how the public API is consumed and validated for compatibility. Our types have been (lovingly) [community-contributed](https://www.npmjs.com/package/@types/react-native), and since merged and aligned in our codebase. However, these have relied on manual maintenance and no automated tooling,introducing correctness gaps.
22
+
Historically, we've approximated this. React Native is authored in [Flow](https://flow.org/), but the community has long since moved to TypeScript in open source, which is how the public API is consumed and validated for compatibility. Our types have been (lovingly) [community-contributed](https://www.npmjs.com/package/@types/react-native), and since merged and aligned in our codebase. However, these have relied on manual maintenance and no automated tooling,introducing correctness gaps.
23
23
24
-
Additionally, our public JS API has been poorly defined in terms of module boundaries —e.g. internal `'react-native/Libraries/'` deep imports were reachable by app code, but could frequently change as we updated these internals.
24
+
Additionally, our public JS API has been poorly defined in terms of module boundaries —e.g. internal `'react-native/Libraries/'` deep imports were reachable by app code, but could frequently change as we updated these internals.
25
25
26
-
In 0.80, we're addressing these issues by deprecating deep imports, and introducing a user opt-in to a new, generated API baseline in TypeScript. We're calling this our **Strict TypeScript API**. Ultimately, this is the groundwork to offer a stable React Native API in future.
26
+
In 0.80, we're addressing these issues by deprecating deep imports, and introducing a user opt-in to a new, generated API baseline in TypeScript. We're calling this our **Strict TypeScript API**. Ultimately, this is the groundwork to offer a stable React Native API in the future.
27
27
28
28
## Deprecating deep imports from `react-native`
29
29
@@ -131,12 +131,12 @@ npx expo start --clear
131
131
132
132
## Strict TypeScript API (opt-in)
133
133
134
-
The Strict TypeScript API is a new set of TypeScript types in the `react-native` package, which can be opted into via your `tsconfig.json`. We're shipping these alongside our existing TS types,meaning you can choose to migrate when ready.
134
+
The Strict TypeScript API is a new set of TypeScript types in the `react-native` package, which can be opted into via your `tsconfig.json`. We're shipping these alongside our existing TS types,meaning you can choose to migrate when ready.
135
135
136
136
The new types are:
137
137
138
-
1.**Generated directly from our source code** —improving coverage and correctness, so you can expect stronger compatibility guarantees.
139
-
2.**Restricted to `react-native`'s index file** —more tightly defining our public API, and meaning we won't break the API when making internal file changes.
138
+
1.**Generated directly from our source code** —improving coverage and correctness, so you can expect stronger compatibility guarantees.
139
+
2.**Restricted to `react-native`'s index file** —more tightly defining our public API, and meaning we won't break the API when making internal file changes.
140
140
141
141
When the community is ready, the Strict TypeScript API will become our default API in future — synchronized with deep imports removal. This means it's a **good idea** to begin opting in, as you'll be ready for React Native's future stable JS API.
142
142
@@ -178,7 +178,7 @@ We've scoped our public API to the exports of React Native's `index.js` file, wh
178
178
179
179
Types are now generated from source, rather than manually maintained. In doing this:
180
180
181
-
- We've aligned differences that had built up from the community contributed types —and also increased the type coverage of our source code.
181
+
- We've aligned differences that had built up from the community contributed types —and also increased the type coverage of our source code.
182
182
- We've intentionally updated some type names and type shapes, where there was scope to simplify or reduce ambiguity.
183
183
184
184
:::tip Key win
@@ -225,7 +225,7 @@ Please refer to our [dedicated guide](/docs/strict-typescript-api) in the docs w
225
225
226
226
We appreciate that any breaking change to React Native will take time for developers to update to in their apps.
227
227
228
-
#### Now —Opt-in launch (0.80)
228
+
#### Now —Opt-in launch (0.80)
229
229
230
230
The `"react-native-strict-api"` opt-in is stable in the 0.80 release.
231
231
@@ -235,13 +235,13 @@ The `"react-native-strict-api"` opt-in is stable in the 0.80 release.
235
235
236
236
:::tip Recommended
237
237
238
-
The Strict TypeScript API will become our default API in future.
238
+
The Strict TypeScript API will become our default API in the future.
239
239
240
-
If you have time, it's worth testing the opt-in now in your `tsconfig.json`, to futureproof your app or library. This will immediately evaluate if there are any type errors introduced in your app under the Strict API. **There may be none(!)** —in which case, you're good to go.
240
+
If you have time, it's worth testing the opt-in now in your `tsconfig.json`, to futureproof your app or library. This will immediately evaluate if there are any type errors introduced in your app under the Strict API. **There may be none(!)** —in which case, you're good to go.
241
241
242
242
:::
243
243
244
-
#### Future —Strict TypeScript API by default
244
+
#### Future —Strict TypeScript API by default
245
245
246
246
In the future, we will require all codebases to use our Strict API, and will remove the legacy types.
247
247
@@ -304,17 +304,17 @@ Thanks also to [Pieter Vanderwerff](https://github.com/pieterv), [Rubén Norte](
<span style={{ display: 'block', marginBottom: 8 }}>We shared a deep dive into our motivations and the work behind the Strict TypeScript API at <strong>App.js 2025</strong>.</span>
311
-
**[View on YouTube](https://www.youtube.com/live/UTaJlqhTk2g?si=SDRmj80kss7hXuGG&t=6520)**
<span style={{ display: 'block', marginBottom: 8 }}>We shared a deep dive into our motivations and the work behind the Strict TypeScript API at <strong>App.js 2025</strong>.</span>
311
+
<p style={{ marginBottom: 8 }}>**[View on YouTube](https://www.youtube.com/live/UTaJlqhTk2g?si=SDRmj80kss7hXuGG&t=6520)**</p>
0 commit comments