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
By default, these animations have the [default CSS animations for View Transitions](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#customizing_your_animations) applied (most are given a default smooth cross-fade). You can use [view transition psuedo-sectors](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#the_view_transition_pseudo-element_tree) to define "how" the animation runs. For example, using `*` we can change the default for all animations:
93
+
By default, these animations have the [default CSS animations for View Transitions](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#customizing_your_animations) applied (most are given a default smooth cross-fade). You can use [view transition psuedo-selectors](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#the_view_transition_pseudo-element_tree) to define "how" the animation runs. For example, using `*` we can change the default for all animations:
94
94
95
95
```
96
96
// ✅ "how" to animate.
@@ -108,7 +108,10 @@ If you're familar with the browser view transition APIs and curious how we've bu
108
108
109
109
In this post, let's take a look at a few examples of how to use View Transitions.
110
110
111
-
We'll start with an app like this:
111
+
We'll start this app, which doesn't animate any of these interactions:
112
+
- Click a video to view the details.
113
+
- Click "back" to go back to the feed.
114
+
- Type in the list to filter the videos.
112
115
113
116
<Sandpack>
114
117
@@ -4868,13 +4871,13 @@ root.render(
4868
4871
4869
4872
</Sandpack>
4870
4873
4871
-
By defualt, React automatically generates a unique `name` for each element activated for a transition (see [How does `<ViewTransiton>` work](/reference/react/ViewTransition#how-does-viewtransition-work)). When React sees a transition where a `<ViewTransiton>` with a `name` is removed and a new `<ViewTransition>` with the same `name` is added, it will activate a shared element transtion.
4874
+
By default, React automatically generates a unique `name` for each element activated for a transition (see [How does `<ViewTransiton>` work](/reference/react/ViewTransition#how-does-viewtransition-work)). When React sees a transition where a `<ViewTransiton>` with a `name` is removed and a new `<ViewTransition>` with the same `name` is added, it will activate a shared element transtion.
4872
4875
4873
4876
For more info, see the docs for [Animating a Shared Element](/reference/react/ViewTransition#animating-a-shared-element).
4874
4877
4875
4878
### Animating based on cause {/*animating-based-on-cause*/}
4876
4879
4877
-
Sometimes, you may want elements to animate differently because on how it was triggered. For this use case, we've added a new API called `addTransitionType` to specify the cause of a transition:
4880
+
Sometimes, you may want elements to animate differently based on how it was triggered. For this use case, we've added a new API called `addTransitionType` to specify the cause of a transition:
4878
4881
4879
4882
```js {4,11}
4880
4883
functionnavigate(url) {
@@ -12887,7 +12890,7 @@ Once we solve those issues, we'll publish experimental docs and share that it's
12887
12890
12888
12891
## Compiler IDE Extension {/*compiler-ide-extension*/}
12889
12892
12890
-
Earlier this week [we shared](/blog/2025/04/21/react-compiler-rc) the React Compiler release candidate, and we're working towards shipping the first semver stable version of the compiler in the coming months.
12893
+
Earlier this week [we shared](/blog/2025/04/21/react-compiler-rc) the React Compiler release candidate, and we're working towards shipping the first SemVer stable version of the compiler in the coming months.
12891
12894
12892
12895
We've also begun exploring ways to use the React Compiler to provide information that can improve understanding and debugging your code. One idea we've started exploring is a new experimental LSP-based React IDE extension powered by React Compiler, similar to the extension used in [Lauren Tan's React Conf talk](https://conf2024.react.dev/talks/5).
12893
12896
@@ -12913,7 +12916,7 @@ Unfortunately, some hooks are still hard to think in terms of function instead o
12913
12916
12914
12917
We found that often, the confusion is from using an Effect when you don't need to. The [You Probably Don't Need an Effect guide](/TODO), covers many cases for when Effects are not the right solution. However, even when an Effect is the right fit for a problem, Effects can still be harder to understand than class component lifecyles.
12915
12918
12916
-
We believe one of the reasons for confusion is the dependecy array, which allows developers to think of effects from the _components_ perspective (like a lifecycle), instead of the _effects_ point of view (what the effect does).
12919
+
We believe one of the reasons for confusion is the dependency array, which allows developers to think of effects from the _components_ perspective (like a lifecycle), instead of the _effects_ point of view (what the effect does).
12917
12920
12918
12921
Let's look at an example [from the docs](/learn/lifecycle-of-reactive-effects#thinking-from-the-effects-perspective):
0 commit comments