“Web Dev Saga: Week 19 :– React to Next.js: Elevating Frontend with Redux and Exploring Server-Side Power”


Things I Learned This Week :-
This week, I expanded my front-end development knowledge by diving into advanced React concepts and exploring the powerful capabilities of Next.js. Here's what I covered:
Redux in React
I learned how to manage global state efficiently using Redux, especially in large-scale applications. I explored Redux Toolkit to simplify boilerplate and practiced creating actions, reducers, and a central store. Want a quick overview? Check out my keynotes.Introduction to Next.js and File-Based Routing
I got introduced to Next.js as a full-stack React framework. I understood how file-based routing in thepages/
directory automatically maps URLs to components. Looking for code examples? Visit my keynotes.Server Components in Next.js
I explored how Server Components allow rendering parts of the UI on the server, improving performance and reducing client bundle size. I understood when and why to prefer Server Components over Client Components. Want to dive deeper? Check out my keynotes.Script, Link & Image Components in Next.js
I learned how<Script>
,<Link>
, and<Image>
enhance performance and SEO. I implemented image optimization, prefetching links, and controlling third-party scripts. Curious to know more? Head over to my keynotes.Creating APIs in Next.js
I discovered how to build serverless API routes in thepages/api
folder. I practiced creating RESTful endpoints and handling backend logic alongside front-end code. Want to see more theoritical part? Check out my keynotes.Server Actions in Next.js
I learned how Server Actions allow running server-side logic directly from the client. I explored form handling and database updates without writing custom API endpoints. For more details, check out my keynotes.Middleware in Next.js
I understood how Middleware runs before rendering, useful for auth, redirects, and logging. I implemented simple examples to control routing behavior and secure pages. Want to dive deeper? Check out my keynotes.
Steps That I Did :–
Integrated Redux Toolkit in React – Installed and configured Redux Toolkit to manage global state efficiently. Created slices, reducers, and actions to update and access shared application data seamlessly.
Explored File-Based Routing in Next.js – Set up a Next.js project and understood its routing paradigm by creating nested routes using the
app
andpages
directories, enabling automatic route generation based on file structure.Worked with Server Components in Next.js – Differentiated between client and server components. Used server components to fetch and render data directly on the server for improved performance and SEO.
Utilized Script, Link & Image Components – Implemented Next.js built-in components like
<Script>
for loading external scripts,<Link>
for client-side navigation, and<Image>
for optimized image rendering and lazy loading.Built API Routes in Next.js – Created backend functionality by defining API routes under the
/api
directory. Connected frontend components with these routes for server-side data handling.Implemented Server Actions – Experimented with Next.js 14 Server Actions to simplify form handling by directly processing user input on the server without needing explicit API endpoints.
Added Middleware in Next.js – Created middleware logic to perform tasks like authentication checks and redirects before rendering specific routes. Used it to protect pages and streamline user experience.
Challenges I Faced and How I Overcame Them :-
Understanding Redux Flow and Boilerplate
Challenge: At first, managing Redux’s flow—especially with actions, reducers, and the store—felt overwhelming due to its boilerplate setup.
How I Overcame It: I switched to Redux Toolkit, which simplifies the setup process. I followed official documentation, practiced creating slices, and broke down the flow into smaller parts to understand the data lifecycle better.Working with Server Components
Challenge: Differentiating between server and client components and knowing where to use which one was challenging initially.
How I Overcame It: I read the official Next.js documentation and built a few components specifically with data fetching logic to see how Server Components improve performance.Understanding Server Actions
Challenge: Since Server Actions are a newer concept in Next.js, there was limited guidance and examples.
How I Overcame It: I referred to the Next.js 14 updates and community articles, and experimented with simple use cases like form handling to get comfortable.Middleware Logic and Execution
Challenge: Figuring out where and how to implement middleware, and understanding how it affects the request/response cycle in Next.js.
How I Overcame It: I started with small tasks like redirection and authentication checks, and closely observed middleware execution using logs.
Resources I Used :-
Documentation :- NextJS
Conclusion :-
This week has been a transformative chapter in my frontend journey as I deepened my understanding of React and began exploring the powerful world of Next.js. From managing complex state using Redux to building optimized, server-rendered applications with Next.js, every topic added a new layer of clarity and confidence to my development skills.
It was not just about learning syntax or writing code—it was about understanding the "why" behind each tool and how they fit into the broader web development ecosystem. With every hook, route, and server component, I'm getting closer to building scalable, high-performance applications.
I’m excited about the road ahead as I continue to bridge theory with real-world application. Stay tuned for more updates—and as always, keep learning, keep building, and keep growing. 🚀💻✨
Subscribe to my newsletter
Read articles from Dhairya Khanna directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
