Skip to content

Instantly share code, notes, and snippets.

View EverybodyKurts's full-sized avatar

Kurt Mueller EverybodyKurts

  • 00:41 (UTC -04:00)
View GitHub Profile

React.memo, React.useCallback, React.useMemo

Normally, function components are rerendered every time the application renders. If you have large/complex components, this can affect application performance.

You can use React.memo, React.useCallback, and React.useMemo to memoize parts of your application. This means that React will cache and reuse their previous results instead of rerendering them.

Example:

We start with a useReducer-based Counter application, with the following additions:

@EverybodyKurts
EverybodyKurts / DragDropPage.fs
Created February 7, 2022 03:19 — forked from JordanMarr/DragDropPage.fs
Fable bindings for "react-dnd" using HTML5 provider
module DragDropPage
open Feliz
open Fable.React
open Fable.React.Props
open ReactDND
type Language = {
Name: string
}