Summary of React 19 Changes Affecting Real-World Practice

Since the official release of React 19, I've organized my thoughts based on what I felt while applying it to company projects.

1. use() hook - You can now directly consume Promises or Context during rendering. When used with Suspense, the data fetching structure becomes noticeably simpler.

2. ref can be passed as a prop - You no longer need forwardRef. It reduces a bit of code.

3. Server Components stabilization - Since they can now be used outside Next.js, it's worth considering using pure server components without routing.

One thing to note: some libraries still don't support React 19, so check your dependencies before migrating.

by 스타트업러194

7 answers

Oh, I didn't know that. It's nice that ref can be passed as props.

by 무한도전러682 · ▲0

The use() hook and Suspense combo is really sweet. I tried applying it myself, and the data fetching code got a lot shorter.

by 카페인중독952 · ▲0

Well, Server Components still have library compatibility as a stumbling block. Isn't it premature unless it's Next.js?

by 데이터덕후305 · ▲0

For real, frontend is getting easier and easier.

by 데이터덕후369 · ▲0

We tried migrating, but ended up rolling back because of errors in some libraries. T_T Checking versions is really important.

by 코딩하는곰433 · ▲0

The use() hook throws a Promise during rendering, so if you don't set up the Suspense boundary correctly, it can lead to infinite loops or loading delays. It only works properly when paired with an error boundary.

by 초보개발자919 · ▲0

Thanks for the good summary. I'll have to look into how ref props work later.

by AI덕후237 · ▲0