Skip to content

Commit b534854

Browse files
committed
blog: add feedback from PR
1 parent f6c92ba commit b534854

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

website/blog/2024-10-23-release-0.76-new-architecture.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,52 @@
11
---
22
title: 'React Native 0.76 - New Architecture by default, React Native DevTools, Box Shadows and more'
33
authors: [blakef, cipolleschi, frankcalise, gabrieldonadel]
4-
tags: [engineering]
4+
tags: [announcement, release]
55
date: 2024-10-23
66
---
77

8-
Today we are excited to release React Native 0.76! This is a major milestone for React Native, with the New Architecture enabled by default, and the new React Native DevTools. This has been the culmination of 6 years of hard work from our incredible community of developers to make this day happen.
8+
Today we are excited to release React Native 0.76! This is a major milestone for React Native, with the New Architecture enabled by default, and the new React Native DevTools. This has been the culmination of 6 years of hard work from our incredible community of developers.
99

1010
### Highlights
1111

12-
- [React Native New Architecture by default](#react-native-new-architecture-by-default)
13-
- [React Native DevTools](#react-native-devtools)
14-
- [Box Shadow and Filter style props](#box-shadow-and-filter-style-props)
12+
- [React Native New Architecture by default](/blog/2024/10/23/release-0.76-new-architecture#react-native-new-architecture-by-default)
13+
- [React Native DevTools](/blog/2024/10/23/release-0.76-new-architecture#react-native-devtools)
14+
- [Box Shadow and Filter style props](/blog/2024/10/23/release-0.76-new-architecture#box-shadow-and-filter-style-props)
1515

1616
### Breaking Changes
1717

18-
- [Removed the dependency on the react-native-community/cli](#removed-the-dependency-on-the-react-native-communitycli)
19-
- [[Android] React Native C++ code is distributed as libreactnative.so](#android-react-native-is-distributed-as-a-single-library)
20-
- [Updates to Minimum iOS and Android SDK requirements](#updates-to-minimum-ios-and-android-sdk-requirements)
18+
- [Removed the dependency on the react-native-community/cli](/blog/2024/10/23/release-0.76-new-architecture#removed-the-dependency-on-the-react-native-communitycli)
19+
- [[Android] React Native C++ code is distributed as libreactnative.so](/blog/2024/10/23/release-0.76-new-architecture#android-react-native-is-distributed-as-a-single-library)
20+
- [Updates to Minimum iOS and Android SDK requirements](/blog/2024/10/23/release-0.76-new-architecture#updates-to-minimum-ios-and-android-sdk-requirements)
2121

2222
<!--truncate-->
2323

2424
## Highlights
2525

2626
### React Native New Architecture by default
2727

28-
The New Architecture is finally here and starting from 0.76 is enabled by default in your projects.
28+
The New Architecture is here. Starting from 0.76 the New Architecture is enabled by default in your projects.
2929

30-
Thanks to our collaboration with the whole community, we feel now confident to make this step. We verified that more than [880 libraries](https://reactnative.directory/?newArchitecture=true) are compatible with the New Architecture, including all the Expo Modules.
30+
Thanks to the community's validation and testing, we now feel confident making this change. We verified that more than [880 libraries](https://reactnative.directory/?newArchitecture=true) are compatible with the New Architecture, including all the Expo Modules in the Expo SDK. We also worked with companies like [BlueSky](https://github.com/bluesky-social/social-app/releases/tag/1.92.0-na-rc.2) and [Kraken](https://blog.kraken.com/product/engineering/kraken-new-architecture) to validate the app migration, and they are already using it in production.
3131

32-
To make sure your experience with the New Architecture will be great, we worked with [BlueSky](https://github.com/bluesky-social/social-app/releases/tag/1.92.0-na-rc.2) and Kraken who are already using it in production.
33-
34-
This change will be completely transparent to you: by upgrading to version 0.76, following the instruction in the [upgrade helper](https://react-native-community.github.io/upgrade-helper/?from=0.75.4&to=0.76.0), you’ll also be turning on the New Architecture. We don’t expect any changes in behaviors in your app.
32+
This change will be completely transparent to you. Upgrade to version 0.76 by following the instructions in the [upgrade helper](https://react-native-community.github.io/upgrade-helper/?from=0.75.4&to=0.76.0), and the New Architecture will be enabled by default. We don’t expect any changes in behaviors in your app.
3533

3634
If for any reason you can’t move to the New Architecture, you can still opt-out from it.
3735

38-
On Android, you can modify the `gradle.properties` file and turn the `newArchEnabled` flag to `false`.
36+
- On Android, you can modify the `gradle.properties` file and turn the `newArchEnabled` flag to `false`.
3937

4038
```diff
4139
-newArchEnabled=false
4240
+newArchEnabled=false
4341
```
4442

45-
On iOS, you can opt-out from the New Architecture by installing Cocoapods dependencies with the command:
43+
- On iOS, you can opt-out from the New Architecture by installing Cocoapods dependencies with the command:
4644

4745
```bash
4846
RCT_NEW_ARCH_ENABLED=0 bundle exec pod install
4947
```
5048

51-
As part of the work to make the New Architecture the default, we also revamped most sections of the [website](https://reactnative.dev) to reflect these changes. If you need the documentation of the [Legacy Native Modules](https://reactnative.dev/docs/0.76/legacy/native-modules-intro) and [Legacy Native Components](https://reactnative.dev/docs/0.76/legacy/native-components-android), you can find it in the Legacy Architecture section. Otherwise, the rest of the website assumes that you are looking for New Architecture documentation.
49+
As part of the work to make the New Architecture the default, we also revamped most sections of the website to reflect these changes. If you need the documentation of the [Legacy Native Modules](/docs/next/legacy/native-modules-intro) and [Legacy Native Components](/docs/next/legacy/native-components-android), you can find it in the Legacy Architecture section. Otherwise, the rest of the website **assumes that you are looking for New Architecture documentation**.
5250

5351
### React Native DevTools
5452

@@ -65,18 +63,20 @@ Key features:
6563
- **Instant launch** — React Native DevTools is ready by default with zero config. Open from the in-app Dev Menu or via <kbd>j</kbd> to debug in the CLI server, which now supports multiple emulators and devices.
6664

6765
React Native DevTools is fundamentally different from our previous debugging options, including being different from the Experimental Debugger experience first shipped in 0.73. It switches to a new backend debugging stack that we’ve rebuilt from the ground up over the last year, in partnership with the Hermes team. This means that compatibility with previous tooling [has changed](https://github.com/react-native-community/discussions-and-proposals/discussions/819#:~:text=announcement%20talk%20%F0%9F%8E%AC.-,Compatibility,-React%20Native%20DevTools), and you should also expect a much more reliable experience end-to-end. These foundational improvements will support the addition of future features that we're keen to bring to users, such as the Performance and Network panels.
68-
Phasing out logs in Metro
66+
67+
#### Phasing out logs in Metro
68+
6969
In our next release, we’re also removing forwarded logs in Metro. We are doing this to align with modern browser tooling and to remove old, non-CDP, debugging integrations. Streamed application logs are not a pattern in web bundlers or in native build tools, and these are neither well-formatted nor searchable. Instead, please use React Native DevTools and its fully featured Console panel. See more under our [FAQs](https://github.com/react-native-community/discussions-and-proposals/discussions/819#:~:text=point%20is%20deprecated.-,FAQs,-React%20Native%20DevTools).
7070

7171
**Links**
7272

73-
- [Updated debugging docs](https://reactnative.dev/docs/debugging)
73+
- [Updated debugging docs](/docs/debugging)
7474
- [Announcement talk at React Universe Conf](https://www.youtube.com/watch?v=OwivVpg6Luc)
7575
- [Feedback thread and FAQs](https://github.com/react-native-community/discussions-and-proposals/discussions/819)
7676

7777
### Box Shadow and Filter style props
7878

79-
We’ve added two New-Architecture-only style props in 0.76 - `boxShadow` and `filter`. Both of these props exist on the web, and the team tried to stick to the specs when possible so that these props are predictable, familiar, and ultimately easier to adopt. As a result you can look up the web documentation to fully understand how these work, but there are a few important differences which are noted below.
79+
We’ve added two New Architecture only style props in 0.76 - `boxShadow` and `filter`. Both of these props exist on the web, and the team tried to stick to the specs when possible so that these props are predictable, familiar, and ultimately easier to adopt. As a result, you can look up the web documentation to fully understand how these work, but there are a few important differences which are noted below.
8080

8181
#### `boxShadow`
8282

@@ -86,15 +86,15 @@ We’ve added two New-Architecture-only style props in 0.76 - `boxShadow` and `f
8686

8787
`boxShadow` can take either a string, which mimics the CSS syntax, or JS objects which can embed variables. For example the string `‘5 5 5 0 rgba(255, 0, 0, 0.5)’` and the object `{offsetX: 5, offsetY: 5, blurRadius: 5, spreadDistance: 0, color: ‘rgba(255, 0, 0, 0.5)’}` would yield the same box shadow.
8888

89-
The difference between `boxShadow` and the [existing shadow functionality](https://reactnative.dev/docs/shadow-props) is existing shadows:
89+
There are some difference between the new `boxShadow` and the [existing shadow functionality](https://reactnative.dev/docs/shadow-props):
9090

91-
- Do not work on Android
91+
- Does not work on Android
9292
- Cannot be [inset](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#inset)
93-
- Do not have [spread](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#length)
94-
- Do not work on `View`s if there is no background color
95-
- Are separate props, so they cannot share web syntax
93+
- Does not have [spread](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#length)
94+
- Does not work on `View`s if there is no background color
95+
- Is a separate prop, so it cannot share the same web syntax
9696

97-
**Limitations & Spec Deviations**
97+
#### Limitations & Spec Deviations
9898

9999
- The default shadow color is black, not the parent’s color
100100
- Android normal shadows are supported on **Android 9+**
@@ -104,14 +104,15 @@ The difference between `boxShadow` and the [existing shadow functionality](https
104104

105105
`filter` adds certain graphical filters to an element. There are a mix of color filters that let you modify things like brightness, saturation, and hue as well as non-color filters that let you add blurs and shadows. Check out the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) for a full overview of each individual filter function, along with a fiddle to try them out for yourself. Below is a hot dog image with various filters applied to it.
106106

107-
![From left to right: no filter, saturate filter, blur filter, invert filter](../static/blog/assets/0.76-filter-example.png)
108-
109-
<p align="center">From left to right: no filter, `saturate` filter, `blur` filter, `invert` filter</p>
107+
<figure>
108+
<img alt="Filters demonstration" src="/blog/assets/0.76-filter-example.png" />
109+
<figcaption>From left to right: no filter, <code>saturate</code> filter, <code>blur</code> filter, <code>invert</code> filter</figcaption>
110+
</figure>
110111

111112
Like `boxShadow`, `filter` can take either a string, which mimics the CSS syntax, or an array of JS objects which can embed variables. For example the string `‘saturate(0.5) grayscale(0.25)’` and the array `[{saturate: 0.5}, {grayscale: 0.25}]` would yield the same filter.
112113
`filter` has a `dropShadow` value which varies slightly from `boxShadow`. The biggest difference is that `dropShadow` is an alpha mask - so the shadow will only be cast by a pixel if it has a nonzero alpha component. `boxShadow`, on the other hand, will cast around the border box of the element, even if nothing is inside of it. Additionally, dropShadow does not have a spread distance parameter and cannot be inset (shadow cast inside of the element).
113114

114-
**Limitations and Spec Deviations**
115+
#### Limitations and Spec Deviations
115116

116117
- iOS `filter` only supports brightness and opacity
117118
- iOS `filter` will not apply to shadows, outlines, or any other graphical elements outside the bounds of the element
@@ -132,9 +133,9 @@ If you are relying on the CLI in your daily workflow, make sure to explicitly [a
132133
//…
133134
“devDependencies”: {
134135
// …
135-
+ “@react-native-community/cli”: “15.0.0”,
136-
+ "@react-native-community/cli-platform-android": “15.0.0”,
137-
+ "@react-native-community/cli-platform-ios": “15.0.0”,
136+
+ “@react-native-community/cli”: “15.0.0”,
137+
+ "@react-native-community/cli-platform-android": “15.0.0”,
138+
+ "@react-native-community/cli-platform-ios": “15.0.0”,
138139
},
139140
```
140141

@@ -145,7 +146,7 @@ This change comes with reduction in app size, and improvement in app startup per
145146

146147
On the other hand, this is a breaking change for both app and library developers.
147148

148-
App developers will have to update their Application’s onCreate as follows:
149+
App developers will have to update their Application’s `onCreate` as follows:
149150

150151
```diff
151152
+import com.facebook.react.soloader.OpenSourceMergedSoMapping
@@ -173,7 +174,7 @@ We have updated our minimum platform and SDK versions:
173174
- iOS: [15.1](https://support.apple.com/en-gb/108051#151)
174175
- Android: [SDK 24](https://developer.android.com/tools/releases/platforms#7.0) (Android 7)
175176

176-
This change was announced earlier in the year when 0.75 [was released](https://reactnative.dev/blog/2024/08/12/release-0.75#last-version-supporting-minsdk-23-and-miniosversion-134). For more background, please see the dedicated posts for [Android](https://github.com/react-native-community/discussions-and-proposals/discussions/802) and [iOS](https://github.com/react-native-community/discussions-and-proposals/discussions/812).
177+
This change was announced earlier in the year when 0.75 [was released](/blog/2024/08/12/release-0.75#last-version-supporting-minsdk-23-and-miniosversion-134). For more background, please see the dedicated posts for [Android](https://github.com/react-native-community/discussions-and-proposals/discussions/802) and [iOS](https://github.com/react-native-community/discussions-and-proposals/discussions/812).
177178

178179
### Other Breaking Changes
179180

0 commit comments

Comments
 (0)