New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@alesmenzel/nuclear-react

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alesmenzel/nuclear-react

Nuclear react bindings.

latest
Source
npmnpm
Version
2.0.0-alpha.0
Version published
Maintainers
1
Created
Source

⚛️ Nuclear React

Nuclear Core's bindings for React.

Installation

npm install @alesmenzel/nuclear-core @alesmenzel/nuclear-react

Usage

See @alesmenzel/nuclear-core documentation.

useAtom

Hook useAtom is used to subscribe React component to the atom's state. Whenever the atom's value changes, the subscribed React components will re-render as well.

import { atom } from '@alesmenzel/nuclear-core';
import { useAtom } from '@alesmenzel/nuclear-react';

const Counter = () => {
  const [count, setCount, countAtom] = useAtom(() => atom(100));

  return (
    <div>
      <pre>{count}</pre>
      <button onClick={() => setCount((count) => count + 1)}>Increment by 1</button>
    </div>
  );
};

FAQs

Package last updated on 02 Oct 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