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

react-memento

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-memento

Step-through and rewind react state transitions.

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

react-memento

Step-through and rewind react state transitions.

import React from 'react';
import { useMemento } from 'react-memento';

function App() {
  const [count, setCount, memento] = useMemento(0, 'count');

  return (
    <button onClick={() => setCount(count + 1)}>{increment}</button>
    <p>{count}</p>

    {memento}
  );
}

useMemento maintains a similar api to react's state hook. In addition to the current value, and a setter, it provides a memento component to display the debugger UI. The function also accepts an optional label to identify multiple mementos rendered to the page.


unrelated - but i was listening to this architecture presentation by Neri&Hu while writing. i was struck by how beautiful the vernacular buildings are in Jiangnan China.

jiangnan architecture

FAQs

Package last updated on 06 Nov 2018

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