0.5.0 • Published 5 years ago

@simplux/immer v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

simplux - Redux, but simple

simplux is state management as it should be: simple to use, no boilerplate, type-safe but not verbose - all while giving you the full power of Redux.

npm version Build Status codecov license

Recipes

Instead of traditional documentation simplux has these recipes that will show you how it can make life simple for you. Each recipe will help you solve one particular task that you will typically face during development.

For every "How do I do X?" you have ever asked yourself, there should be a recipe here. If you find one that is missing, please let us know by creating an issue or even better, provide the recipe as a pull request.

Basics

Advanced

React

Angular

Motivation

When discovering this library your first thought may have been: "Are you kidding me, yet another state management library?" That is an absolutely valid thought to have. There are many existing options for managing your state in JavaScript applications. If you are already using one of those and it works for you, then you should probably stick with it. However, simplux brings some unique points to the table that make it a worthwhile addition to the state management ecosystem:

  • excellent task-driven documentation: a lot of effort went into writing our recipes. While most other libraries have documentation that is centered around explaining what they do, our task-driven documentation is focused on showing you how simplux helps you to solve your concrete tasks. We also provide code sandboxes for every recipe that allow you to interact with the code while reading the recipe, which greatly improves the learning experience.

  • strong focus on testability: testing is a very important topic that is sadly often neglected. simplux takes testability very seriously and makes sure that you know how you can test the code you have written using it (you may have noticed that the recipe immediately after getting started already shows you how you can test the code from the first recipe).

  • optimized for TypeScript: simplux is built with and for TypeScript. Sometimes TypeScript code can be a bit verbose. We put a lot of effort into ensuring that the amount of type annotations in your code is minimized by leveraging type inference wherever possible. That said simplux can also be used with plain JavaScript, in which case your IDE may still use the TypeScript information to help you due to our bundled typings.

  • out of the box solutions for many common yet complex use-cases: Have you ever tried setting up hot module reloading or code splitting with React and Redux? It can be quite tricky. simplux aims to solve as many of these complex use-cases by providing zero-configuration out of the box solutions.

  • modular and extensible architecture: Our core package only contains the bare minimum that is required to use simplux. All other advanced functionality is added via extension packages. On one hand this allows you to pick and choose what functionality you want to use without paying for anything that you don't. On the other hand it allows adding new extension packages without risk of breaking any existing functionality.

Prior Art

This library was heavily inspired by Rematch and shares a lot of ideas with it.

Open points

  • core: add memoization to selectors (also mention this briefly in the "derived state" recipe)
  • core: add note to "composing my selectors" recipe about interplay with memoization (e.g. due to in-place sorting)
  • react: add tests that verify HMR works
  • react: add tests that verify server-side rendering works
  • react: verify package works with react-native
  • entities: create package for managing collections of entities
  • entities: create default set of entity management mutations
  • entities: allow creating custom mutations that act on one entity
  • entities: create default set of selectors for entities
  • docs: create website
  • add dtslint tests for all packages

Contributing

If you want to help with the development of this library please have a look at the contributing guidelines.

License

Everything in this repository is licensed under the MIT License unless otherwise specified.

Copyright (c) 2019-present Jonathan Ziller

0.6.0-alpha.2

5 years ago

0.6.0-alpha.1

5 years ago

0.6.0-alpha.0

5 years ago

0.5.0

5 years ago

0.5.0-alpha.0

5 years ago

0.4.3-alpha.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.3.0-alpha.4

5 years ago

0.3.0-alpha.3

5 years ago

0.3.0-alpha.2

5 years ago

0.3.0-alpha.1

5 years ago

0.3.0-alpha.0

5 years ago

0.2.3-alpha.0

5 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago