🚀 Switched to React Query for API handling Earlier, I was managing API calls with useEffect — handling loading, errors, and refetching manually. Started using TanStack Query (React Query) and it simplified everything. Key learnings: • Built-in caching and automatic refetching • Cleaner handling of loading & error states • Managing server state instead of manual fetching Small change, but it improved both code quality and performance significantly. #React #TanStackQuery #Frontend #JavaScript #LearningInPublic
Switched to React Query for API Handling
More Relevant Posts
-
If your applications run on Express.js (and millions do), this blog is worth your time. This breakdown covers: - Supported versions and timelines - What EOL actually means for your risk posture - Migration paths and blockers - Options for long‑term support https://lnkd.in/dd2hJ8NE #Nodejs #Express #JavaScript #EOL
To view or add a comment, sign in
-
REST API Best Practices Every Dev Needs Building APIs that won't haunt you at 2AM 🔥 Here are 5 patterns that separate good devs from great ones: 1️⃣ Use nouns, not verbs — /users not /getUsers 2️⃣ Version your API — /api/v1/ saves future headaches 3️⃣ Plural resource names — /products not /product 4️⃣ Always HTTPS — never expose APIs over plain HTTP 5️⃣ Rate limit everything — protect from abuse And please… return the right status codes. 400 ≠ 500 🙏 A well-designed API is like a good joke — if you have to explain it, it's not that good. Save this for your next project! 🔖 #RestAPI #WebDevelopment #BackendDev #NodeJS #APIDesign #JavaScript #SoftwareEngineering #TechTips
To view or add a comment, sign in
-
-
🚀 Just published a new React package: table-components-react A lightweight and customizable table component built for modern React applications. Designed to simplify data rendering while keeping flexibility for real-world use cases. ✨ Highlights: • Easy to integrate • Customizable columns & data • Clean and reusable components • Developer-friendly API Check it out on npm: https://lnkd.in/dcvj9X-V Feedback and contributions are welcome! #ReactJS #npm #opensource #frontend #javascript
To view or add a comment, sign in
-
Real Example (in Frontend + Backend terms): What actually happens when you click “Login” You enter email & password → click login Frontend (React/Angular) → sends request Backend (ASP.NET Core API) → receives it Backend → checks database Database → verifies user Backend → sends response Frontend → shows success / error That’s the full flow we build as full-stack developers. Once this clicks, backend, APIs, debugging—all start making more sense. Tomorrow → what exactly the API is doing in this flow (simple breakdown) #DotNet #FullStackDevelopment #AspNetCore #Frontend #Backend #WebDevelopment #APIDesign #DeveloperLife #CodingJourney #TechExplained #LearnInPublic
To view or add a comment, sign in
-
-
To improve your front-end skills, search for "public APIs" on Google, choose a topic that interests you, and create a basic layout to show the data from the API. This is a simple way to begin using data from an external source and will help you learn important front-end skills. #frontend #frontenddeveloper #api JavaScript Mastery w3schools.com #javascript
To view or add a comment, sign in
-
Mistake #2: I treated state like a storage layer. If I needed a value, I stored it. Even when it could be calculated from existing data. At first, it felt convenient. Later, it became a mess. Now I had to keep multiple states in sync. One small change, and something else broke. The shift was simple, but powerful: State should be minimal. Everything else should be derived. If a value can be computed, don’t store it. This reduced bugs more than any library ever did for me. Follow for Day 3. Repost if you’ve maintained “too much state”. #reactjs #frontend #javascript #stateManagement #webdevelopment #cleanCode
To view or add a comment, sign in
-
-
𝗬𝗼𝘂𝗿 𝗡𝗼𝗱𝗲.𝗷𝘀 𝗔𝗣𝗜 𝗵𝗮𝗻𝗱𝗹𝗲𝘀 𝟭𝟬𝗸 𝗿𝗲𝗾/𝘀 𝗶𝗻 𝗹𝗼𝗮𝗱 𝘁𝗲𝘀𝘁𝘀. 𝗖𝗿𝗮𝘀𝗵𝗲𝘀 𝗮𝘁 𝟮𝟬𝟬 𝗶𝗻 𝗽𝗿𝗼𝗱. The culprit is almost never a missing feature — it's unhandled errors silently rotting your process. Unhandled promise rejections swallow errors without a trace. One missing 𝘢𝘸𝘢𝘪𝘵 in a hot path can leave your app running in a broken state — no crash, no log, no clue. Why this works: 🔹 Fail fast — don't let the process limp in a broken state 🔹 Log before exit — full context for post-mortem 🔹 Let your process manager (𝗣𝗠𝟮, 𝗘𝗖𝗦 tasks, or container orchestration) restart clean — that's what they're for A dead process is recoverable. A zombie one silently corrupts everything around it. #NodeJS #JavaScript #BackendEngineering #AWS
To view or add a comment, sign in
-
-
Next.js is no longer just a frontend framework. It is becoming a full-stack system. What has changed: • Server Components reduce client-side JavaScript • Built-in data fetching simplifies architecture • API routes eliminate the need for a separate backend (in many cases) Common mistake: • Treating Next.js like traditional React What we focus on: • Moving logic closer to the server • Reducing unnecessary client complexity • Designing around data flow, not components Learning: Modern frameworks are shifting architecture, not just syntax. #nextjs #react #fullstack #webdevelopment #Developers #architecture #engineering
To view or add a comment, sign in
-
🚨 Stop Calling the Same API Twice (React + NestJS Developers) One of the most common mistakes I still see: 👉 Fetching data on the server (SSR) 👉 AND calling the same API again on the client (useEffect) This leads to: ❌ Duplicate API calls ❌ Slower performance ❌ Increased backend load ❌ Wasted SSR benefits 💡 The correct approach: If data is already fetched on the server: ✔️ Pass it as props / initial state ✔️ Hydrate it on the client ✔️ Avoid unnecessary re-fetch Only call APIs on the client when: 🔹 Data needs refresh 🔹 User interaction happens (filters, search, pagination) 🔹 Real-time updates are required ⚡ Pro Tip: Use tools like React Query / SWR with initialData and staleTime to control re-fetching intelligently. 📊 At scale, this mistake can DOUBLE your API load. Don’t just make it work — make it efficient. #ReactJS #NestJS #WebPerformance #FullStackDevelopment #BestPractices #SoftwareEngineering #Peregrine
To view or add a comment, sign in
-
you upgraded to React 20. suddenly your code breaks. defaultProps is gone. string refs throw errors. you're migrating code from 2018. welcome to the cleanup. why it breaks: React 20 removes patterns deprecated since React 16. defaultProps on function components, string refs (ref="myRef"), legacy context API — all gone. if your code still uses these, React 20 errors immediately. run npx @react-codemod/cli react-20 to auto-migrate. #reactjs #typescript #webdevelopment #buildinpublic #react20
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development