Installation
How to install the Magos into your Project
To install Magos into your project, you can use any of the major package managers. Magos is lightweight and designed to work seamlessly across different environments.
📦 Installation
Choose the command that matches your preferred package manager:
pnpm add magosnpm install magosyarn add magosbun add magosMagos is constantly evolving with better type inference and performance optimizations. To ensure you are using the latest features (like the new unbox API), run the following command:
pnpm add magos@latestnpm install magos@latestyarn add magos@latestbun add magos@latest⚙️ Requirements
Magos is designed to be modern and fast. To ensure the best experience, please check the following requirements:
-
TypeScript: version 4.5+ (recommended for full type safety).
-
React: version 18.0+.
-
Runtime: Works in all modern browsers and Node.js environments.
🏗️ What's next?
Now that Magos is part of your project, you're ready to start structuring your state. We recommend following this path:
-
Create your first Box: Learn how to define state and actions.
-
Setup a Store: Combine multiple boxes into a single, organized store.
-
Connect to UI: Choose between React or Vanilla JS to bring your state to life.
Tips
Magos is tree-shakable. Only the parts you use Vanilla or React will end up in your final bundle!