Skip to content
memo / 1.7.3

memo 1.7.3

Install from the command line:
Learn more about npm packages
$ npm install @virtualstate/memo@1.7.3
Install via package.json:
"@virtualstate/memo": "1.7.3"

About this version

@virtualstate/memo

memo for JSX values.

Support

Node.js supported Deno supported Bun supported

Test Coverage

100%25 lines covered 100%25 statements covered 100%25 functions covered 100%25 branches covered

Usage

import { memo } from "@virtualstate/memo";
import { descendants } from "@virtualstate/focus";
import { Component, Body } from "./somewhere";

const tree = memo(
    <>
        <Component />
        <main>
            <Body />
        </main>
    </>
);

// On the first usage, the tree will be memo'd as it is read
console.log(await descendants(tree));

// Uses the memo'd version, Component & Body aren't called again
console.log(await descendants(tree));

Details


Assets

  • memo-1.7.3.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0