fast-react-context
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

fast-react-context

Make to react context faster

npm version npm npm All Contributors

Installation

NPM

Require

react >= 18

To install the latest stable version:

npm install --save fast-react-context

Basic usage:

import React, { Component } from 'react';
import createFastContext from 'fast-react-context';

const { Provider, useStore } = createFastContext({
  title: 'App Fast Context',
});

const ChildComponent = () => {
  const [title] = useStoreTitle((store) => store.title);

  return <h5>{title}</h5>;
}

export default const App {

  return <Provider>
        <ChildComponent />
    </Provider>;
}

With context

Context

With fast context

Context

Package Sidebar

Install

npm i fast-react-context

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

21.5 kB

Total Files

12

Last publish

Collaborators

  • hunghg255