Smit Desaismitd.hashnode.dev·Apr 17, 2024Optimizing your Large Scale React ApplicationSingle Responsibility Principle Restaurant Card has a single responsibility to display Restaurant Cards on web-pageHeader Component has a single responsibility to display header on web-page So similarly for each Component that we create, we should gi...Discusslarge scale react application
Dipankar Barmanblog.dipankar.dev·Apr 12, 2024Write Clean Code using Custom Hooks in React.After the introduction of hooks in React v16.8, the way we write code in React has changed drastically. We no longer need to write class-based components to manage state inside components. Today we will learn how to leverage custom hooks to write cle...DiscussReact
Mannu Chaurasiyadeckwish5245.hashnode.dev·Apr 9, 2024Creating Custom hooks in React jsCustom hooks is not different things it is as usual same thing as it normal hooks like useState and useEffect use as common mrthodology to implement their code in best possible manner such that, it's implementation is mostly used in fetching an api ,...DiscussReactHooks
Krishan Kumarpodiumofcode.hashnode.dev·Mar 8, 2024How To Make Custom Hooks in ReactIntro Isn't it cool to create your own hooks in your React app? Is it even possible? Is it even true? Yes, we can create custom hooks in React. So, what are we waiting for let's create... Rules for Creating a Custom Hook There are rules for everythin...Discuss·3 likes·34 readsReact
Victory Asokomehsoks.hashnode.dev·Feb 26, 2024A Practical Guide to Testing React Applications (Unit Tests)Introduction Test Driven Development (TDD) is a beneficial practice for engineers, but in reality, it's not always feasible. However, the initial investment in writing automated tests is worth the effort as it saves you time in the long run. In this ...Discuss·1 like·32 readsReact
Yadvir Kauryadvirkaur.hashnode.dev·Feb 6, 2024Simplifying State Management in React with the Query Object PatternAs projects grow, so does the complexity of managing the state and passing arguments between components. In this blog post, we'll explore a practical refactoring approach using a concept called "Query Object Pattern" to enhance the scalability of our...Discussquery object pattern
Yadvir Kauryadvirkaur.hashnode.dev·Feb 5, 2024The Power of Generic Hooks in React Data FetchingHello! Welcome back! In my previous post, we created a custom hook, like 'useUsers', to fetch data from a specific endpoint, say '/users'. But what if we need data from different endpoints like '/posts'? We'd end up writing similar custom hooks, intr...Discuss·38 readsgeneric hooks
Yadvir Kauryadvirkaur.hashnode.dev·Feb 1, 2024ReactJS : Building Clean Components with Custom Data Fetching HooksIntroduction Managing HTTP requests in React components presents challenges, especially regarding code cleanliness and maintainability. This article delves into the creation of clean and modular components through the utilization of custom data fetch...Discuss·37 readsCustom Data Fetching Hooks
Akash Thoriyaakashthoriya.hashnode.dev·Jan 26, 2024Custom Hook for Form Handling in ReactImplementation This hook will manage form inputs and validation, providing an easy way to track form states and perform validation on inputs. import { useState } from 'react'; function useForm(inputs) { const [formValues, setFormValues] = useState...DiscussReactJS Fundamentals for InterviewsReact
Akash Thoriyaakashthoriya.hashnode.dev·Jan 26, 2024Custom Hook for Data Fetching in ReactImplementation This hook will manage the fetching of data from an API, including handling the loading state and any errors. import { useState, useEffect } from 'react'; function useFetchData(url) { const [data, setData] = useState(null); const [...Discuss·1 likeReactJS Fundamentals for InterviewsReact