Alex Sidorenko Profile Banner
Alex Sidorenko Profile
Alex Sidorenko

@asidorenko_

25,095
Followers
260
Following
517
Media
2,116
Statuses

Making short videos about Next.js

World
Joined February 2016
Don't wanna be here? Send us removal request.
@asidorenko_
Alex Sidorenko
1 year
Prop drilling? Sometimes all you need is a little restructuring.
89
754
5K
@asidorenko_
Alex Sidorenko
2 years
A simple composition trick to avoid re-rendering a component.
Tweet media one
48
316
3K
@asidorenko_
Alex Sidorenko
2 years
Forms in React
Tweet media one
46
247
3K
@asidorenko_
Alex Sidorenko
9 months
Internationalization (i18n) in Next.js 13
49
333
3K
@asidorenko_
Alex Sidorenko
10 months
Infinite scroll in Next.js 13 with server actions
41
269
2K
@asidorenko_
Alex Sidorenko
1 year
"Thinking in React" visualized
18
340
2K
@asidorenko_
Alex Sidorenko
10 months
Pagination in Next.js 13 with server components
20
282
2K
@asidorenko_
Alex Sidorenko
3 months
Conditional parallel routes in Next.js
25
202
2K
@asidorenko_
Alex Sidorenko
9 months
GitHub authentication in Next.js 13 with NextAuth
34
192
2K
@asidorenko_
Alex Sidorenko
9 months
Dynamic parallel routes in Next.js 13
37
234
2K
@asidorenko_
Alex Sidorenko
3 years
"Atomic Habits" by @JamesClear was the first book I read twice in a row 😅
Tweet media one
64
65
2K
@asidorenko_
Alex Sidorenko
7 months
When to use Server vs Client components in Next.js 13
19
241
2K
@asidorenko_
Alex Sidorenko
1 year
When the parent state changes, React recursively re-renders all children, but there is a nuance. Writing an article about it.
27
196
2K
@asidorenko_
Alex Sidorenko
10 months
Server-side search with Next.js 13 and server components
29
205
2K
@asidorenko_
Alex Sidorenko
9 months
Modal with intercepting route in Next.js 13
36
197
2K
@asidorenko_
Alex Sidorenko
8 months
Caching in Next.js 13
29
223
2K
@asidorenko_
Alex Sidorenko
9 months
Modal in Next.js 13
35
184
2K
@asidorenko_
Alex Sidorenko
1 year
React re-renders recursively, and when it comes across the element that preserves its referential identity from the previous render, it can stop the recursion. That's why component composition can be used as an alternative to memoization.
@asidorenko_
Alex Sidorenko
1 year
When the parent state changes, React recursively re-renders all children, but there is a nuance. Writing an article about it.
27
196
2K
14
185
2K
@asidorenko_
Alex Sidorenko
9 months
Active navigation link in Next.js 13
28
161
1K
@asidorenko_
Alex Sidorenko
9 months
Authentication in Next.js 13 using Clerk
27
150
1K
@asidorenko_
Alex Sidorenko
8 months
How to show an inline loading indicator in Next.js with server components? With "useTransition"
19
186
1K
@asidorenko_
Alex Sidorenko
10 months
"How do I migrate React client component to a server component if it fetches data based on client state?" Move the state to the URL
26
160
1K
@asidorenko_
Alex Sidorenko
9 months
Protect routes with next-auth middleware in Next.js 13
23
145
1K
@asidorenko_
Alex Sidorenko
6 months
Modal with parallel routes in Next.js (without intercepting)
28
142
1K
@asidorenko_
Alex Sidorenko
1 year
How to pass data from the child component to its parent in React? Lift the state up. Pass the updater function down.
18
184
1K
@asidorenko_
Alex Sidorenko
10 months
Server Actions in Next.js 13
35
168
1K
@asidorenko_
Alex Sidorenko
1 year
React Rendering (animation v.2)
19
216
1K
@asidorenko_
Alex Sidorenko
8 months
"How to prevent Links from scrolling to the top of the page in Next.js 13?"
10
129
1K
@asidorenko_
Alex Sidorenko
16 days
next-view-transitions
@shuding_
Shu
26 days
Easy-to-use CSS View Transitions API helpers for Next.js App Router:
28
120
1K
10
124
1K
@asidorenko_
Alex Sidorenko
10 months
Fetch data based on select value in Next.js 13
18
127
1K
@asidorenko_
Alex Sidorenko
9 months
How to refactor an existing client component into a server component? 1. Move the state to the URL 2. Move data fetching to the server 3. Isolate interactivity into a smaller client component
34
155
1K
@asidorenko_
Alex Sidorenko
9 months
Move client components to the leaves of the component tree where possible.
11
153
1K
@asidorenko_
Alex Sidorenko
10 months
Per-request data caching in Next.js 13
20
140
1K
@asidorenko_
Alex Sidorenko
9 months
Partial rendering in Next.js 13. "Only the route segments that change on navigation re-render on the client, and any shared segments are preserved"
26
135
1K
@asidorenko_
Alex Sidorenko
1 year
Refactoring existing React app with Context to Server Components
9
150
1K
@asidorenko_
Alex Sidorenko
9 months
"Some navigation links feel unresponsive in Next.js 13." Add a loading state to the page.
21
101
1K
@asidorenko_
Alex Sidorenko
8 months
Optimistic updates in Next.js 13
13
104
1K
@asidorenko_
Alex Sidorenko
9 months
Parallel routes with independent loading and error states in Next.js 13
19
143
1K
@asidorenko_
Alex Sidorenko
6 months
How to use Framer Motion with Server Components
15
117
1K
@asidorenko_
Alex Sidorenko
9 months
How to hide the first pagination page from the URL in Next.js 13
17
93
1K
@asidorenko_
Alex Sidorenko
3 months
Route transition animations in Next.js (App Router) with Framer Motion
26
111
1K
@asidorenko_
Alex Sidorenko
7 months
How to re-trigger suspense in Next.js 13 when search params change
17
106
1K
@asidorenko_
Alex Sidorenko
1 year
"Why can't I access an updated state value in React immediately?"
35
113
1K
@asidorenko_
Alex Sidorenko
2 months
Sequential vs Parallel data fetching
18
105
994
@asidorenko_
Alex Sidorenko
4 months
How to show a toast message with server actions in Next.js
21
77
989
@asidorenko_
Alex Sidorenko
9 months
"I have one server component that fetches a lot of data and makes the entire page slow to load in Next.js 13" Wrap it with Suspense
19
80
967
@asidorenko_
Alex Sidorenko
1 year
Using the "key" to reset all state of the component on prop change.
13
96
962
@asidorenko_
Alex Sidorenko
8 months
Error handling in Next.js 13
17
84
941
@asidorenko_
Alex Sidorenko
19 days
Typed routes in Next.js
11
73
945
@asidorenko_
Alex Sidorenko
5 months
How to show 404 page for dynamic routes in Next.js (App Router)
14
93
928
@asidorenko_
Alex Sidorenko
7 months
How loading.jsx works when combined with Suspense in Next.js 13
15
96
907
@asidorenko_
Alex Sidorenko
1 year
Avoid state-effect ping pong. Calculate values during render when possible.
10
94
902
@asidorenko_
Alex Sidorenko
1 year
React render ≠ DOM update Look how many React components re-render when we open a "Tweet" modal, yet how few browser repaints are happening.
12
100
858
@asidorenko_
Alex Sidorenko
2 months
Real-time data updates with Next.js and Supabase
13
77
839
@asidorenko_
Alex Sidorenko
5 months
How to enable logging for fetch requests in Next.js 14
8
85
814
@asidorenko_
Alex Sidorenko
9 months
React Server Components bring composability to another level
14
103
804
@asidorenko_
Alex Sidorenko
6 months
How to re-trigger Suspense in Next.js when searchParams change
8
92
810
@asidorenko_
Alex Sidorenko
2 years
Before creating a new state variable, make sure it can't be calculated from the existing state.
Tweet media one
24
85
800
@asidorenko_
Alex Sidorenko
6 months
Deleting items with Server Actions in Next.js
18
83
792
@asidorenko_
Alex Sidorenko
9 months
Dark mode in Next.js 13 with next-themes and Tailwind
11
77
774
@asidorenko_
Alex Sidorenko
1 year
How to update React components on scroll or mousemove with good performance and without refs? Colocate the state with the parts of the UI that need to change.
18
89
776
@asidorenko_
Alex Sidorenko
8 months
Pre-generating popular searches statically at build time in Next.js 13
10
80
769
@asidorenko_
Alex Sidorenko
8 months
Middleware in Next.js 13
9
79
760
@asidorenko_
Alex Sidorenko
8 months
How to hide header on certain pages in Next.js 13? With route groups + layouts.
15
83
756
@asidorenko_
Alex Sidorenko
5 months
"How can I automatically revalidate the Next.js cache when someone updates data in CMS?"
14
80
753
@asidorenko_
Alex Sidorenko
8 months
How to show a loading state for the form with server action in Next.js 13
7
74
713
@asidorenko_
Alex Sidorenko
9 months
Client components are like units of interactivity in otherwise server-rendered or even statically generated pages. They can live on the leaves of your component tree or even wrap the server components, providing interactivity to server-rendered / statically generated content.
11
86
707
@asidorenko_
Alex Sidorenko
9 months
Generate dynamic routes statically at build time in Next.js 13 with "generateStaticParams"
16
89
703
@asidorenko_
Alex Sidorenko
7 months
Handling Server Action errors in Next.js 13 (Works with disabled JS)
15
77
710
@asidorenko_
Alex Sidorenko
1 month
What is a CDN
11
94
713
@asidorenko_
Alex Sidorenko
6 months
Partial Prerendering in Next.js 14
11
75
707
@asidorenko_
Alex Sidorenko
6 days
staleTimes in Next.js 14.2
11
46
744
@asidorenko_
Alex Sidorenko
5 months
Partial Prerendering in Next.js
6
75
679
@asidorenko_
Alex Sidorenko
9 months
2 strategies for showing a loading state when re-fetching current page in Next.js 13
9
89
669
@asidorenko_
Alex Sidorenko
6 months
How to pass i18n dictionaries to client components in Next.js
8
73
671
@asidorenko_
Alex Sidorenko
1 year
When structuring your Server and Client Components in Next.js 13
13
74
653
@asidorenko_
Alex Sidorenko
10 months
How to build AI chatbot with Next.js, OpenAI, and Vercel AI SDK
10
75
651
@asidorenko_
Alex Sidorenko
10 months
Q: "Next.js 13 keeps showing stale data after mutation. How do I show fresh data?" - Add revalidatePath - Remove link prefetching if needed
16
79
652
@asidorenko_
Alex Sidorenko
6 months
"My Suspense fallback doesn't show up" Make sure you fetch data in the component you suspend.
10
79
649
@asidorenko_
Alex Sidorenko
2 months
"use client" marks a boundary between the server and client code on the module dependency tree. Every component imported in a file with "use client" automatically becomes a client component. We can still pass server components as props to the client components.
9
66
635
@asidorenko_
Alex Sidorenko
1 year
React Reconciliation
5
86
623
@asidorenko_
Alex Sidorenko
8 months
Generating a profile form with v0
11
47
621
@asidorenko_
Alex Sidorenko
1 year
What if you could put a native HTML validation error wherever you want...
19
51
608
@asidorenko_
Alex Sidorenko
3 months
Sortable list with server components and optimistic updates in Next.js
10
54
613
@asidorenko_
Alex Sidorenko
6 months
How to add a confirmation dialog for a server action in Next.js
14
65
605
@asidorenko_
Alex Sidorenko
8 months
Route groups in Next.js 13
10
46
600
@asidorenko_
Alex Sidorenko
4 months
Shallow routing in Next.js 14 with history.pushState
13
58
591
@asidorenko_
Alex Sidorenko
1 year
Using the key to apply keyframes animation on every re-render.
16
59
590
@asidorenko_
Alex Sidorenko
2 years
Prop drilling? Before you reach for context 👇
Tweet media one
19
50
588
@asidorenko_
Alex Sidorenko
6 months
How to create a link that downloads a static file instead of opening it
10
48
585
@asidorenko_
Alex Sidorenko
1 year
React Server Component that streams GPT response to HTML during page load (runs in the latest @nextjs ) No client code is involved. Just recursive Suspense.
12
43
587
@asidorenko_
Alex Sidorenko
2 years
I've got a lot of requests for code examples for A Visual Guide to React Rendering. So I've built this Code Sandbox that you can use as an interactive companion to the articles. 👆
6
104
579
@asidorenko_
Alex Sidorenko
7 months
You may not need prop-drilling/context/state management to handle data in RSC. Just fetch data where you need it and dedupe with React cache.
24
64
582
@asidorenko_
Alex Sidorenko
5 months
Parallel routes and default.js in Next.js
7
62
565
@asidorenko_
Alex Sidorenko
5 months
Toggle Suspense fallback with React DevTools to update the styles of a loading screen
7
59
574
@asidorenko_
Alex Sidorenko
5 months
By default, Next.js will generate routes statically at build time. Here are the things that make the route render dynamically at the request time instead:
9
58
569
@asidorenko_
Alex Sidorenko
8 months
Displaying error for a server action form in Next.js 13
8
62
560
@asidorenko_
Alex Sidorenko
3 months
With RSC, we can refresh the server state of a page while keeping its client state.
11
37
555
@asidorenko_
Alex Sidorenko
8 months
"How to render the component client-side only (completely skipping SSR) in Next.js 13?" With dynamic imports.
13
61
541
@asidorenko_
Alex Sidorenko
1 year
JSX is just syntactic sugar for React.createElement()
Tweet media one
5
48
541