neuron
Home / getting started
Install the @sandstack/neuron
package in your project.
npm install @sandstack/neuron
yarn add @sandstack/neuron
You can also include a cdn in your html file.
<script src="https://unpkg.com/@sandstack/neuron@0.0.0-alpha.44/umd/index.js"></script>
Neuron can be imported into your js file through ESM Imports or CommonJS.
import { createStore } from "@sandstack/neuron";
const { createStore } = require("@sandstack/neuron");
Neuron was made with the thought of a totally customizable global state management system that could be used for specific needs of the developer despite what JS framework or library they use. As of now there are two flavors you can choose from VanillaJS and React. Click the one that you want to use below.
VanillaJS
This is the barebones library that can be used in any js application or html file. You will have to use onDispatch
to setup your own reactive state needs.
React This is a wrapper around VanillaJS Neuron. It uses a React centric api that includes components and hooks to manage global state in your React app.
Happy hacking!