Try effector with React in seconds!
Effector React Vite is a lightweight and efficient tool for building React applications. It combines the powerful capabilities of Effector for state management, React for UI rendering, Vite for fast module bundling, and TypeScript for strong typing. With this combination, developers can create high-performance React applications with ease.
To install Effector React Vite, follow these steps:
npx create-vite@2 my-app --template react-ts
cd my-app
npm install effector patronum
src/App.tsx with the following code:import React from 'react';
import { useStore } from 'effector-react';
import { createStore } from 'effector';
const counter = createStore(0);
const App = () => {
const count = useStore(counter);
const increment = () => {
counter.setState((prevState) => prevState + 1);
};
const decrement = () => {
counter.setState((prevState) => prevState - 1);
};
return (
<div>
<h1>Effector React Vite</h1>
<p>Counter: {count}</p>
<button onClick={increment}>Increment</button>
<button onClick={decrement}>Decrement</button>
</div>
);
};
export default App;
npm run dev
http://localhost:3000 to see the running application.Effector React Vite is a powerful combination of Effector, Patronum, React, Vite, and TypeScript. It provides developers with a streamlined experience for building React applications with efficient state management, event-driven systems, and fast development/building tooling. By following the installation guide, developers can quickly set up their project and start building dynamic and performant React applications.