Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/state

Package Overview
Dependencies
Maintainers
12
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/state

A set of utils to create framework agnostic and reusable state managers

  • 0.66.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by0.82%
Maintainers
12
Weekly downloads
 
Created
Source

@fluentui/state

A set of utils to create framework agnostic and reusable state managers.

  • Installation
  • Usage
  • Usage with React

Installation

NPM

npm install --save @fluentui/state

Yarn

yarn add @fluentui/state

Usage

import { createManager, ManagerFactory } from '@fluentui/state';

type InputState = { value: string };
type InputActions = { change: (value: string) => void };

const createInputManager: ManagerFactory<InputState, InputActions> = config =>
  createManager<InputState, InputActions>({
    ...config,
    actions: {
      change: (value: string) => () => ({ value }),
    },
    state: { value: '', ...config.state },
  });
const manager = createInputManager({ state: { value: 'Hello world!' } });

Usage with React

We provide React bindings under @fluentui/react-bindings.

FAQs

Package last updated on 12 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc