Best of ReactJune 2024

  1. 1
    Article
    Avatar of devtoDEV·2y

    onClick={someFunction} VS onClick={()=>someFunction}

    Using `onClick={someFunction}` directly references the function and executes it on click without creating an extra function, making it more efficient for simple handlers. In contrast, `onClick={() => someFunction()}` creates a new function on each render, ideal for scenarios where arguments need to be passed or additional operations are required before executing the function.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Compound Components Pattern in React

    Learn about the compound component pattern in React, which helps in building flexible and scalable components by using a suite of reusable components that work together to accomplish a task.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    How to reduce unused JavaScript in your code?

    Reducing unused JavaScript is crucial for optimizing modern websites. This guide covers techniques like code splitting, tree shaking, minifying JavaScript, loading scripts asynchronously, dynamic imports, and lazy loading to help improve web performance by cutting down on unnecessary code.

  4. 4
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    What's New in React 19

    React 19 introduces numerous features and enhancements, including improved data mutation handling, optimistic updates, and new APIs like `use()`. The update also offers innovative tools such as a new open-source compiler for performance optimization. Developers can learn about these enhancements via a comprehensive course provided by Bob Ziroll from Scrimba and freeCodeCamp.org on YouTube.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    awesome-shadcn-ui

    A curated list of awesome things related to shadcn/ui, including pre-made but customizable components, useful components not available in shadcn/ui, and custom input components.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    Zustand in Next.js 14 (with ts)

    Learn how to use Zustand, a simple and scalable state management solution, in a Next.js project with TypeScript. The post guides you through setting up a new project, integrating Zustand, and creating a state store. It also covers adding actions to manage the state and persisting state data using localStorage.

  7. 7
    Article
    Avatar of communityCommunity Picks·2y

    Build a real-time voting app with WebSockets, React & TypeScript 🔌⚡️

    Learn how to build a real-time voting app using WebSockets in a React-NodeJS environment. Discover two methods: one using ExpressJS and Socket.IO for a customizable approach and the other using the Wasp full-stack framework for easier integration. Explore the differences between these methods, including setup complexity, control, and type safety. This guide highlights the limitations of serverless solutions for WebSockets and provides step-by-step instructions to implement and configure real-time communication features.

  8. 8
    Article
    Avatar of devtoDEV·2y

    Write SOLID React Hooks

    Learn how to apply SOLID principles to React hooks, including the Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, and Dependency Inversion Principle.

  9. 9
    Article
    Avatar of communityCommunity Picks·2y

    Understanding React Compiler

    React's core architecture of calling functions repeatedly can lead to performance issues, especially with expensive functions. The React Compiler automates performance tuning by rewriting code to include memoization and caching. Transpilers, compilers, and optimizers are tools that analyze and transform code into a functionally equivalent form. The Fiber tree in React manages state and dependencies, with the React Compiler enhancing performance by automatically caching results. While this saves processing power, it increases memory usage and can complicate debugging due to additional abstraction layers.

  10. 10
    Article
    Avatar of communityCommunity Picks·2y

    Build UI

    Learn how to build modern user interfaces for the web using Radix UI, ship an app with Remix framework, fetch data with React Server Components, add animations to React apps using Framer Motion, master Tailwind CSS, and get to know Sam Selikoff and Ryan Toronto.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    React: You are Using useEffect() Wrong, Do This Instead

    Learn about the usage of the useEffect() hook in React and how to optimize its usage for better performance.

  12. 12
    Video
    Avatar of communityCommunity Picks·2y

    Authentication in React with JWTs, Access & Refresh Tokens (Complete Tutorial)

    This post explains the importance of authentication in a React application and how to handle it using JWTs, access tokens, and refresh tokens. It emphasizes the need for proper authentication to ensure security and prevent data breaches. The post also provides a code example that shows how to implement authentication in a React codebase.

  13. 13
    Article
    Avatar of awegoAwesome Go·2y

    Announcing River UI

    River UI provides a user-friendly interface for managing SQL-backed job queues, featuring a backend Go API and a frontend built with React and TypeScript. It allows users to monitor job states, interact by cancelling, retrying, or deleting jobs, and offers features like pausing queues during issues. River UI is available as a Docker image and a pre-built static binary, with future enhancements planned.

  14. 14
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    Mastering Shadcn UI Components

    A comprehensive course on freeCodeCamp.org's YouTube channel teaches how to master Shadcn, a toolset providing highly customizable and accessible React components. It covers the main UI components, their integration with React or Next.js projects, and the ability to customize them via CSS variables or Tailwind CSS for consistent theming. This course is beneficial for both beginners and experienced developers looking to speed up their development process and maintain control over component styling and behavior.

  15. 15
    Article
    Avatar of communityCommunity Picks·2y

    How I Use Adapter Pattern in React

    The post discusses the use of the Adapter pattern in React development to handle mismatched data structures between the backend API response and React components. It explains how the Adapter pattern can be applied in React and provides an example of using the pattern with `react-query`. The post emphasizes the flexibility and organization provided by the Adapter pattern and encourages readers to explore different implementations and design patterns.

  16. 16
    Article
    Avatar of communityCommunity Picks·2y

    The best free, open-source SaaS template for React & NodeJS

    Open SaaS is a free, open-source SaaS template for React, NodeJS, and Prisma. It offers features such as authentication, admin dashboard, analytics integration, stripe payments, typesafety, AI-powered example app, and easy deployment.

  17. 17
    Article
    Avatar of telerikTelerik·2y

    useLayoutEffect vs. useEffect in React

    Exploring the differences between useLayoutEffect and useEffect hooks in React and when to use each hook effectively.

  18. 18
    Article
    Avatar of devtoDEV·2y

    Weak memoization in Javascript

    This article explains the concept of memoization in JavaScript and discusses different approaches to implement it. It also highlights the use of WeakMap for memoization and its advantages.

  19. 19
    Article
    Avatar of tigerabrodiTiger's Place·2y

    Optimizing React Context and Re-renders

    Learn how to optimize React Context to minimize re-renders. The post covers evaluating the causes of re-renders, splitting context into multiple contexts, using the useMemo hook for memoizing context values, and leveraging React.memo for state from higher components. Practical code examples are provided to demonstrate these optimization techniques.

  20. 20
    Article
    Avatar of communityCommunity Picks·2y

    Building a Netflix show recommender using Crawlee and React

    Learn how to build a Netflix show recommender using Crawlee and React, guided through scraping Netflix content with Crawlee and visualizing it with a React app built with Vite. The guide covers prerequisites, installation steps, writing scraping code using Cheerio, and integrating the scraped data into a React application.

  21. 21
    Video
    Avatar of t3dotggTheo - t3․gg·2y

    I can’t believe they built this in React

    The post explores the creation of an interactive 3D badge for the Vercel Ship 2024 event using React 3 Fiber, an advanced tool for rendering 3D elements in React. It breaks down the tech stack, including Blender for model preparation, React, React 3 Fiber, and React 3 Rapier for physics. The guide covers setting up a 3D environment, integrating physics, and handling user interactions, offering readers a comprehensive look into developing interactive 3D components on the web.

  22. 22
    Article
    Avatar of communityCommunity Picks·2y

    How to build: a To-Do list app with an embedded AI copilot (Next.js, GPT4, & CopilotKit)

    Learn how to build a To-Do list app with an embedded AI copilot using Next.js and CopilotKit. Prerequisites include a basic understanding of React or Next.js. Integrate AI functionalities using CopilotKit and generate to-do lists with the in-app chatbot.

  23. 23
    Article
    Avatar of devtoDEV·2y

    Creating a Reusable Component in React: Handling Unlimited Future Changes

    Learn how to create reusable components in React by using the compound component pattern. This approach allows for more flexibility, readability, scalability, and reusability in managing complex UI requirements.

  24. 24
    Article
    Avatar of medium_jsMedium·2y

    React Projects and State management

    Learn about the useState hook in React, its usage in applications, and best practices for using it. Discover how the useState hook can help manage and update data in your projects.

  25. 25
    Article
    Avatar of lnLaravel News·2y

    SQLite Studio is a SQLite Database Explorer

    SQLite Studio is a lightweight, single-command database explorer for SQLite databases, which also supports connections to local SQLite databases, remote libSQL Servers, and PostgreSQL Servers. It features an intuitive interface with an overview of metadata, infinite scroll for rows view, and a custom query page. The backend is built with Rust while the frontend leverages TypeScript, React, Tailwind CSS, and Vite. SQLite Studio is open-source and available on GitHub.