Best Practices for React Server Components & Hot Frontend News šŸ”„

Hey friend,

Will I see you in Utah or in Brussels? I'm giving a talk at React Rally as well as React Brussels and if you are planning to come, I'd love to know. We can hang out IRL and that would be freaking cool! Reply and let me know if you do :)

If you want to come but need a discount code, let me know and I can share a discount code with you!

React Server components have been in a lot of controversy lately šŸ˜…. Do you know why? Because many claim that it is not ready for production.

I've also been working on updating my Next.js course over to Next.js latest stable version. Thanks to the Next.js team, they have worked on improving the bugs and performance.ā€‹

Remember, innovation can only happen with a bit of resistance. Even though the upgrade has not been a smooth road, we need to work together as a community.

Also, keep an eye out and subscribe to my Youtube channel šŸŽ„, where I am going to share how to successfully upgrade your app and also more fun stuff with React Server Components and Next.js.

Our Weekly Snack: Server component cannot be a child of Client Component šŸæ

If you look into the Next.js docs, it is considered an anti-pattern to pass Server component a child of Client component. But this is such a common pattern, isn't it?

Imagine you have a blog and that blog renders a few blog posts with a bunch of Cards on top. Every Card component also has a Date component that formats the date. Now, the structure of it would look like this.

We are wrapping the 2 cards inside another Server component called Card List.

But remember, Card is a Client component and Date is a Server component. So we can no longer just declare Date inside Card anymore i.e. a Server Component inside Client component.

How can we achieve this then? Here's how šŸ‘‡

What's next for me? I want to hear from you šŸ‘‡

You probably know that I am an Educator, and I'm currently working on updating my Next.js course as well as doing the full launch of Developer to Leader.

But what's next? This is where you come in and can help me. Help me figure out my next offer! Hop in here and let me know what you think!ā€‹

The Frontend Developers Toolbox šŸ§°

See you next week!

A Frontend Newsletter that you'll love! šŸ’–