Best of React HooksOctober 2022

  1. 1
    Article
    Avatar of patternsPatterns·4y

    Hooks Pattern

    React 16.8 introduced a new feature called Hooks. Hooks are functions that you can use to manage a components state and lifecycle methods. Hooks make it possible to - add state to a functional component - manage a component's lifecycle without using a class component. In both componentDidMount and componentWillUnmount, we're customizing the behavior of the app based on the window's resize event.

  2. 2
    Article
    Avatar of medium_jsMedium·4y

    A guide to React 18 hooks

    React 18 Hooks are the new patterns that got introduced in React 16.8 version. Hooks were introduced in class components but this time in the functional components. These Hooks Apis could help us interact with the React local states, the lifecycle features and many more things.

  3. 3
    Article
    Avatar of communityCommunity Picks·4y

    There’s No Magic in React

    JS engine will go through our code starting from the ‘global scope’ The aim of these lines is to understand what happens inside the components every time we update the state. When we call count we access to n from the outer scope (line 2) States update with value or updater Now, can you tell me what will be shown on the screen with this code? What’s your guess?

  4. 4
    Article
    Avatar of communityCommunity Picks·4y

    Use React Context for Auth

    React Context is built into React, it's a native feature. This means that we don't need to install any third party libraries to use it. We will only build the frontend part, meanig the part that will allow our frontend to know if the user is logged in or not and react accordingly. The next step is to wrap your app in the context provider.

  5. 5
    Article
    Avatar of vercelVercel·4y

    Building an interactive WebGL experience in Next.js – Vercel

    Next.js is a JavaScript API for rendering 3D graphics within a web browser. By leveraging WebGL, we were able to take what would have been a static conference signup and turn it into the immersive Next.js Conf registration page. We now have some pieces to build a mini-game, but thin, uniform lines don’t look like the rays of light.