Seb ⚛️ ThisWeekInReact.com
@sebastienlorber.com
9.5K followers 750 following 950 posts
🔥 Join 45k React devs - Stay up-to-date: 📨 ThisWeekInReact.com Docusaurus maintainer @ Meta
Posts Media Videos Starter Packs
Pinned
sebastienlorber.com
This Week In React 253 - Special React Conf

🍿 Read/subscribe: thisweekinreact.com/newsletter/253

⚛️
- Compiler 1.0
- React Foundation
-
-
- useEffectEvent
-
📱
- RN 0.82
- Hermes V1
- DOM APIs
- Vega OS
- Keyboard Controller
- IAP
- Skia
Reposted by Seb ⚛️ ThisWeekInReact.com
sebastienlorber.com
This Week In React 253 - Special React Conf

🍿 Read/subscribe: thisweekinreact.com/newsletter/253

⚛️
- Compiler 1.0
- React Foundation
-
-
- useEffectEvent
-
📱
- RN 0.82
- Hermes V1
- DOM APIs
- Vega OS
- Keyboard Controller
- IAP
- Skia
sebastienlorber.com
This Week In React 253 - Special React Conf

🍿 Read/subscribe: thisweekinreact.com/newsletter/253

⚛️
- Compiler 1.0
- React Foundation
-
-
- useEffectEvent
-
📱
- RN 0.82
- Hermes V1
- DOM APIs
- Vega OS
- Keyboard Controller
- IAP
- Skia
sebastienlorber.com
But if you include it in the dependency array because yu don't use ESLint or whatever, it does re-run, right?

I mean there's no magic to taint/tag the function and special handling in useEffect?
sebastienlorber.com
Or maybe I'm reading your post wrong

I read it this way:
"the Effect doesn't re-run, even if you include the Effect Event fn in the dependency array and it's unstable"

Maybe what I should have understood:
"the Effect doesn't re-run, because you do not include the Effect Event fn in deps"
sebastienlorber.com
"doesn't cause an Effect that contains the function to re-run even though the function is "unstable""

Would be curious to double-check that, because it's not exactly what @danabra.mov said.

bsky.app/profile/dana...
danabra.mov
not quite although that's close. it's actually "unstable" on purpose so that you don't rely on stable-ness. it *does* see the latest props/state, but the real trick is that the linter will ask you to NOT include it in the dependencies.
sebastienlorber.com
Almost as bad as the iOS wheel 👌😆
sebastienlorber.com
I don't know either, but I'm interested, so I hope you'll have the answer 😅
Reposted by Seb ⚛️ ThisWeekInReact.com
sebastienlorber.com
Just announced at React Conf - New React API available in canary:
🔥 <ViewTransition>
🔥 <Fragment ref>

Particularly excited for Fragment Refs, exposing platform-specific APIs such as:
- addEventListener()
- observeUsing()
- focus()
- getClientRects()
- scrollIntoView()
sebastienlorber.com
Also curious

The code above taken from official docs doesn't really try to avoid unobserve/reobserve (it could use useEffectEvent?) so I guess ref fn could lead to the same result?
sebastienlorber.com
Yes
Yet it has progressed recently from PRs I've seen. I expected it to eventually become canary today, but maybe too soon
sebastienlorber.com
The ref is not an actual Dom node so it doesn't expose platform APIs dirextly

It's probably registering the observer to all child nodes of the fragment.
Reposted by Seb ⚛️ ThisWeekInReact.com
react.dev
Introducing the React Foundation
sebastienlorber.com
This slide summarizes well all the new things in React

And what to look forward to!

Also, React Compiler is now 1.0!
sebastienlorber.com
Just announced at React Conf - New React API available in canary:
🔥 <ViewTransition>
🔥 <Fragment ref>

Particularly excited for Fragment Refs, exposing platform-specific APIs such as:
- addEventListener()
- observeUsing()
- focus()
- getClientRects()
- scrollIntoView()
sebastienlorber.com
Come on, you can do better

I'm sure you can produce one related to React Conf later today!
sebastienlorber.com
Why is no one posting React memes anymore?

I need some fun things to feature in my newsletter, preferably related to the current week's news!
Reposted by Seb ⚛️ ThisWeekInReact.com
eslint.org
ESLint v10.0.0 is coming! Check out our latest blog post for what to expect.

https://eslint.org/blog/...
Reposted by Seb ⚛️ ThisWeekInReact.com
react.dev
React Conf starts tomorrow!