Skip to content

Commit 8c889ca

Browse files
committed
wip
1 parent 56b3544 commit 8c889ca

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/content/blog/2025/04/01/react-labs-what-we-have-been-working-on-april-2025.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ To opt-in to animating an element, wrap it in the new `<ViewTransition>` compone
7373

7474
This new component lets you declaratively define "what" to animate when an animation is activated.
7575

76-
You can define "when" to animate in three ways:
76+
You can define "when" to animate by using one of these three triggers for a View Transition:
7777

7878
```js {4,7,10,12}
7979
// ✅ "when" to animate.
@@ -90,7 +90,7 @@ const deferred = useDeferredValue(value);
9090
</Suspense>
9191
```
9292

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

9595
```
9696
// ✅ "how" to animate.
@@ -108,7 +108,10 @@ If you're familar with the browser view transition APIs and curious how we've bu
108108

109109
In this post, let's take a look at a few examples of how to use View Transitions.
110110

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

113116
<Sandpack>
114117

@@ -4868,13 +4871,13 @@ root.render(
48684871

48694872
</Sandpack>
48704873

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

48734876
For more info, see the docs for [Animating a Shared Element](/reference/react/ViewTransition#animating-a-shared-element).
48744877

48754878
### Animating based on cause {/*animating-based-on-cause*/}
48764879

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

48794882
```js {4,11}
48804883
function navigate(url) {
@@ -12887,7 +12890,7 @@ Once we solve those issues, we'll publish experimental docs and share that it's
1288712890

1288812891
## Compiler IDE Extension {/*compiler-ide-extension*/}
1288912892

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

1289212895
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).
1289312896

@@ -12913,7 +12916,7 @@ Unfortunately, some hooks are still hard to think in terms of function instead o
1291312916

1291412917
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.
1291512918

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

1291812921
Let's look at an example [from the docs](/learn/lifecycle-of-reactive-effects#thinking-from-the-effects-perspective):
1291912922

0 commit comments

Comments
 (0)