Home

Awesome

⚠️ No longer actively maintained.

Check out feature-state! It offers similar functionality to AgileTs but is significantly more lightweight. I've incorporated my learnings over the years, including insights from AgileTs, to create this new state management library, embracing the principle that the best code is no code :)

πŸ‘‰ If you face any problem feel free open an issue.

❓ If you've any questions, don't hesitate to start a discussion.

<img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/header_background.png" alt="AgileTs">

πŸŽ‡ Global State and Logic Library

<br /> <p align="left"> <a href="https://github.com/agile-ts/agile"> <img src="https://img.shields.io/github/license/agile-ts/agile.svg?label=license&style=flat&colorA=293140&colorB=4a4872" alt="GitHub License"/> </a> <a href="https://npm.im/@agile-ts/core"> <img src="https://img.shields.io/bundlephobia/min/@agile-ts/core.svg?label=bundle%20size&style=flat&colorA=293140&colorB=4a4872" alt="npm minified size"/> </a> <a href="https://npm.im/@agile-ts/core"> <img src="https://img.shields.io/npm/dt/@agile-ts/core.svg?label=downloads&style=flat&colorA=293140&colorB=4a4872" alt="npm total downloads"/> </a> </p> <p align="left"> <a href="https://agile-ts.org"> <img src="https://img.shields.io/badge/Status-Beta-green.svg" alt="Status"/> </a> <a href="https://github.com/agile-ts/agile/actions?query=workflow%3ARelease"> <img src="https://github.com/agile-ts/agile/workflows/Release/badge.svg" alt="Build Status"/> </a> <a href="https://github.com/agile-ts/agile/actions?query=workflow%3A%22Test+All+Packages%22"> <img src="https://github.com/agile-ts/agile/workflows/Test%20All%20Packages/badge.svg" alt="Build Status"/> </a> <a href="https://coveralls.io/github/agile-ts/agile?branch=master"> <img src="https://coveralls.io/repos/github/agile-ts/agile/badge.svg?branch=master" alt="Coverage Badge"/> </a> </p> <p align="left"> <a href="https://twitter.com/intent/tweet?text=I%20just%20discovered%20AgileTs%3B%20a%20global%2C%20spacy%20and%20overall%20easy%20to%20use%20State%20Manager.%0A%60%60%60ts%0Aconst%20MY_STATE%20%3D%20App.createState(%22Hello%20stranger%22)%3B%0AMY_STATE.set(%22Hello%20friend%22)%3B%0A%60%60%60%0Ahttps%3A%2F%2Fgithub.com%2Fagile-ts%2Fagile%2F%20%0A%0A%40AgileTypescript%20%0A%23agilets%20%23statemanagement%20%23webdev%20"><img src="http://randojs.com/images/tweetShield.svg" alt="Tweet" height="20"/> </a> <a href="https://discord.gg/T9GzreAwPH"> <img src="https://img.shields.io/discord/795291052897992724.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2" alt="Join Discord"/> </a> </p> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/how_to_create_state_header.png" alt="How to create a State?"/>
// -- core.js ------------------------------------------

// 1️⃣ Create State with the initial value "Hello Friend!"
const MY_FIRST_STATE = createState("Hello Friend!");


// -- MyComponent.whatever ------------------------------------------

// 2️⃣ Bind initialized State to the desired UI-Component.
// And wolla, the Component is reactive. 
// Everytime the State mutates the Component re-renders.
const myFirstState = useAgile(MY_FIRST_STATE);
console.log(myFirstState); // Returns "Hello Friend!"

Want to learn how to implement AgileTs in your preferred UI-Framework? Check out our Quick Start Guides.

⛳️ Sandbox

Test AgileTs yourself in a codesandbox. It's only one click away. Just select your preferred Framework below.

More examples can be found in the Example section.

<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/why_should_i_use_agile.png" alt="Why should I use AgileTs?"/>

AgileTs is an atom based global State and Logic Library implemented in Typescript. It offers a reimagined API that focuses on developer experience and allows you to easily and flexible manage your application States. Besides States, AgileTs offers some other powerful APIs that make your life easier, such as Collections and Computed States. The philosophy behind AgileTs is simple:

πŸš… Straightforward

Write minimalistic, boilerplate-free code that captures your intent.

// Create State with the inital value 'frank'
const MY_STATE = createState('frank');

// Update the State value from 'frank' to 'jeff'
MY_STATE.set('jeff');

// Undo the latest State value change
MY_STATE.undo();

// Reset the State value to its initial value
MY_STATE.reset();

// Permanently store the State value in an external Storage
MY_STATE.persist("storage-key"); 

πŸ€Έβ€ Flexible

⛳️ Centralize

AgileTs is designed to take all business logic out of the UI-Components and put them in a central place, often called core. The advantage of keeping logic separate to UI-Components, is that your code is more decoupled, portable, scalable, and above all, easily testable.

You can learn more about ways to centralize your application logic with AgileTs in our Style Guides.

🎯 Easy to Use

Learn the powerful tools of AgileTs in a short period of time. An excellent place to start are our Quick Start Guides, or if you don't like to follow tutorials, you can jump straight into the Example section.

<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/installation_header.png" alt="Installation"/>

In order to use AgileTs in a UI-Framework, we need to install two packages.

<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/documentation_header.png" alt="Documentation"/>

Does AgileTs sound interesting to you? Take a look at our documentation, to learn more about its functionalities and capabilities. If you have any further questions, feel free to join our Community Discord. We will be happy to help you.

<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/contribute_header.png" alt="Contribute"/>

Get a part of AgileTs and start contributing. We welcome any meaningful contribution. πŸ˜€ To find out more about contributing, check out the CONTRIBUTING.md.

<a href="https://codeclimate.com/github/agile-ts/agile/coverage.svg"> <img src="https://codeclimate.com/github/agile-ts/agile/badges/gpa.svg" alt="Maintainability"/> </a>

β™₯️ Contributors

<a href="https://github.com/agile-ts/agile/graphs/contributors"> <img src="https://contrib.rocks/image?repo=agile-ts/agile" /> </a>

Become a contributor

<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/packages_of_agile.png" alt="Packages of Agile"/>
NameLatest VersionDescription
@agile-ts/corebadgeState Manager Logic
@agile-ts/reactbadgeReact Integration
@agile-ts/vuebadgeVue Integration
@agile-ts/apibadgePromise based API
@agile-ts/multieditorbadgeSimple Form Manager
@agile-ts/eventbadgeHandy class for emitting UI Events
@agile-ts/loggerbadgeLogging API of AgileTs
@agile-ts/utilsbadgeUtilities of AgileTs
@agile-ts/proxytreebadgeProxy Tree for tracking accessed properties
<br /> <br /> <img src="https://raw.githubusercontent.com/agile-ts/agile/master/static/credits_header.png" alt="Credits"/>

AgileTs is inspired by MVVM Libraries like MobX and PulseJs.

πŸ• Time spent building this project

wakatime