Why React Re-Renders

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • MobX

    Simple, scalable state management.

  • MobX is exactly what you're looking for: https://github.com/mobxjs/mobx

    Vue works similar to React + MobX, but with weird design decisions like implicit reactivity, and a stale ecosystem thanks to the Vue2 vs Vue3 debacle.

  • Svelte

    Cybernetically enhanced web apps

  • I completed it and together with the react official documentation (particularly on hooks and newer react 18 features) have learnt enough to build a good interactive application. Building the app immediately after has taught me much more. You can try patching free tutorials together but given the salary paid to good developers, paying for good training is a great investment.

    I chose react as I had a large application to make and I knew react had 2 critical libraries I wanted to reuse. Having now learnt react and the underlying ideas, I think Svelte (https://svelte.dev/) may solve the general problem better. However it has less libraries/documentation and community support. If I had more time to learn I would have considered learning it as a potentially superior solution.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • react-18

    Workgroup for React 18 release.

  • Heh, unfortunately "update my rendering post to cover React 18" has been on my todo list for _months_ now :)

    As in, I literally have a todo list entry that I keep bumping back until "Next Sunday", because other stuff is higher priority. (like, trying to get Redux Toolkit 1.9 wrapped up and shipped... and also playing as much golf as possible while the weather is decent :) )

    The shortest answer is that it's still effectively the same - the one major change is that React 18 will now batch _all_ updates in _any_ given event loop tick, regardless of whether those were queued up inside a React event handler or not.

    There's a good discussion on this in the React 18 Working Group post on "Automatic Batching":

    https://github.com/reactwg/react-18/discussions/21

  • Immer

    Create the next immutable state by mutating the current one

  • Yeah, we specifically built Redux Toolkit around Immer from the very first prototype that I wrote.

    I had catalogued _dozens_ of immutable update libs between 2015-2018, and Immer is simply superior to all of them.

    Which is why Immer is a non-negotiable part of RTK, and something we specifically tell everyone they should be using with Redux:

    - https://redux.js.org/style-guide/#use-immer-for-writing-immu...

    - https://redux-toolkit.js.org/usage/immer-reducers

    (in fact, I recently got quoted on the top of the Immer docs with a tweet I wrote saying how awesome Immer is :) https://immerjs.github.io/immer/ )

  • React

    The library for web and native user interfaces.

  • This is incorrect. useRef takes an initialValue argument, but it does not treat functions as lazy initializers like useState does. If you pass a function to useRef, you’re just going to get that function as the initial value.

    If you want to lazily initialize a ref, you need to manually check if it has been initialized and run your expensive code if it hasn’t. Dan Abramov provides what appears to be a pattern officially recommended by the React team: https://github.com/facebook/react/issues/14490#issuecomment-...

  • react-redux

    Official React bindings for Redux

  • No. The redux component is just a simple React context that uses `children` [1]:

    {children}

    And `children` behave diferently. `children` is a prop and thus not considered as an element of the Provider component, but of the App component [2]. Meaning the components inside `children` will rerender when App renders, and not when Provider renders.

    1: https://github.com/reduxjs/react-redux/blob/master/src/compo...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Unlocking the frontend – a call for standardizing component APIs pt.2

    8 projects | dev.to | 5 Mar 2024
  • How Do We Structure Our Admin Pages in WordPress

    3 projects | dev.to | 2 Feb 2024
  • 🎄 Top Front-End Frameworks in 2024 Worth Your Time and Effort to Master

    5 projects | dev.to | 13 Dec 2023
  • 👩🏾‍💻React for beginners: an overview

    5 projects | dev.to | 2 Sep 2023
  • Get Started: Must Know Website Builders for 2023 

    3 projects | dev.to | 4 Aug 2023