sebholstein / tinystate Goto Github PK
View Code? Open in Web Editor NEWA tiny, yet powerful state management library for Angular
License: MIT License
A tiny, yet powerful state management library for Angular
License: MIT License
Does someone interested in integration with immer?
That allow us to write like that:
increment() { this.updateState(state => state.count++); }
And still have immutable state.
Currently when adding or installing TinyState (via npm or yarn) in a project, the following warning messages are logged:
warning " > @tinystate/[email protected]" has incorrect peer dependency "@angular/core@^5.0.0".
warning " > @tinystate/[email protected]" has incorrect peer dependency "rxjs@^5.5.6".
So far I have not encountered any issues with the library and Angular 6 / RxJS 6, but will it be updated to officially support those versions of the packages?
When I run yarn test -- --watch --collectCoverage
, I get the following error:
FAIL src/plugins/redux_devtools.spec.ts
โ Test suite failed to run
TypeError: /Users/sebmueller/projects/tinystate/src/plugins/redux_devtools.ts: Cannot read property 'some' of undefined
at VisitState.onEnter (node_modules/istanbul-lib-instrument/dist/visitor.js:141:71)
at VisitState.wrappedEntry (node_modules/istanbul-lib-instrument/dist/visitor.js:336:14)
at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (node_modules/babel-traverse/lib/index.js:114:17)
at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:115:19)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.515s
Ran all test suites related to changed files.
As this library is not accessing the DOM, I will use Jest for testing.
Like @tinystate/persist
Could be useful for Redux Devtools / debugging:
setState({stateFn: (s) => ({count: s.count + 1}), action: 'incrementCount'});
Is it possible to inject a dependency (i.e. a service) into a container?
For example, say I want to fetch some data asynchronously from an api using the HttpClient. Is that something this library supports or is it out scope?
Are there plans to actively maintain TinyState moving forward so that Angular 7 and beyond is supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.