Skip to content

Commit 4ddb218

Browse files
authored
address website build warnings (facebook#4796)
1 parent ff09420 commit 4ddb218

File tree

4 files changed

+53
-53
lines changed

4 files changed

+53
-53
lines changed

docs/_getting-started-macos-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Setting up your development environment can be somewhat tedious if you're new to
6565

6666
Then, click "Next" to install all of these components.
6767

68-
::note
68+
:::note
6969
If the checkboxes are grayed out, you will have a chance to install these components later on.
7070
:::
7171

website/blog/2020-07-06-version-0.63.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ At the same time, we are dropping support for Node 8. [Its LTS maintenance cycle
136136

137137
Thank you to the hundreds of contributors that helped make 0.63 possible!
138138

139-
::note
139+
:::note
140140
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.
141141
:::
142142

website/blog/2024-10-23-the-new-architecture-is-here.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,17 @@ Separating urgent events from transitions allows for a more responsive user inte
230230
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.
231231

232232
<div className="TwoColumns TwoFigures">
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>
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>
241241
</div>
242242

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).
244244

245245
### Automatic Batching
246246

@@ -249,19 +249,19 @@ When upgrading to the New Architecture, you will benefit from automatic batching
249249
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.
250250

251251
<div className="TwoColumns TwoFigures">
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>
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>
260260
</div>
261261

262262
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.
263263

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).
265265

266266
### useLayoutEffect
267267

@@ -303,14 +303,14 @@ useLayoutEffect(() => {
303303
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:
304304

305305
<div className="TwoColumns TwoFigures">
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>
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>
314314
</div>
315315

316316
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
379379

380380
To opt-out from the New Architecture:
381381

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:
383383

384384
```diff title=”gradle.properties”
385385
-newArchEnabled=true

website/blog/2025-06-12-moving-towards-a-stable-javascript-api.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tags: [announcement]
55
date: 2025-06-12T16:00
66
---
77

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.
99

1010
**Quick takeaways:**
1111

@@ -17,13 +17,13 @@ In React Native 0.80, we're introducing two significant changes to React Native'
1717

1818
## What's changing and why
1919

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'`.
2121

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.
2323

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.
2525

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.
2727

2828
## Deprecating deep imports from `react-native`
2929

@@ -131,12 +131,12 @@ npx expo start --clear
131131

132132
## Strict TypeScript API (opt-in)
133133

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.
135135

136136
The new types are:
137137

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.
140140

141141
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.
142142

@@ -178,7 +178,7 @@ We've scoped our public API to the exports of React Native's `index.js` file, wh
178178

179179
Types are now generated from source, rather than manually maintained. In doing this:
180180

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.
182182
- We've intentionally updated some type names and type shapes, where there was scope to simplify or reduce ambiguity.
183183

184184
:::tip Key win
@@ -225,7 +225,7 @@ Please refer to our [dedicated guide](/docs/strict-typescript-api) in the docs w
225225

226226
We appreciate that any breaking change to React Native will take time for developers to update to in their apps.
227227

228-
#### Now — Opt-in launch (0.80)
228+
#### Now — Opt-in launch (0.80)
229229

230230
The `"react-native-strict-api"` opt-in is stable in the 0.80 release.
231231

@@ -235,13 +235,13 @@ The `"react-native-strict-api"` opt-in is stable in the 0.80 release.
235235

236236
:::tip Recommended
237237

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.
239239

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.
241241

242242
:::
243243

244-
#### Future — Strict TypeScript API by default
244+
#### Future — Strict TypeScript API by default
245245

246246
In the future, we will require all codebases to use our Strict API, and will remove the legacy types.
247247

@@ -304,17 +304,17 @@ Thanks also to [Pieter Vanderwerff](https://github.com/pieterv), [Rubén Norte](
304304

305305
:::note Learn more
306306

307-
<div style={{display: 'flex'}}>
308-
<p style={{flex: 1, marginRight: 40, marginBottom: 0}}>
309-
<strong style={{ display: 'block', marginTop: 8, marginBottom: 8 }}>Watch the talk!</strong>
310-
<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)**
312-
</p>
313-
<img
314-
src="/blog/assets/0.80-js-stable-api-appjs.jpg"
315-
style={{ flexShrink: 0, width: '200px', aspectRatio: '16/9', objectFit: 'contain' }}
316-
alt="App.js 2025 Talk"
317-
/>
307+
<div style={{ display: 'flex', alignItems: 'center', gap: 40 }}>
308+
<div style={{ flex: 1 }}>
309+
<strong style={{ display: 'block', marginTop: 8, marginBottom: 8 }}>Watch the talk!</strong>
310+
<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>
312+
</div>
313+
<img
314+
src="/blog/assets/0.80-js-stable-api-appjs.jpg"
315+
style={{ flexShrink: 0, maxWidth: '200px', aspectRatio: '16/9', borderRadius: 10 }}
316+
alt="App.js 2025 Talk"
317+
/>
318318
</div>
319319

320320
:::

0 commit comments

Comments
 (0)