Glimmer Redux
Predictable state management for glimmer apps
Installation
yarn add glimmer-redux
yarn add rollup-plugin-glimmer-redux
Open the ember-cli-build.js
file and add the rollup plugin
const glimmerRedux = ; module { let app = defaults rollup: plugins: ; return app;};
Open the config/environment.js
file and register the reducer type
Add a reducer directory with an index.ts
file
//src/reducers/index.ts; const number = { // ...reducer code}; number;
Examples
https://github.com/glimmer-redux/example-basic
https://github.com/glimmer-redux/example-todomvc
https://github.com/glimmer-redux/example-reduxsaga
Usage with glimmer component
//src/ui/components/HelloWorld/component.ts;; @ { let up = thisup; let text = 'Glimmer Redux'; return ` `; } const stateToComputed = up: statenumberup; const dispatchToActions = ; stateToComputed dispatchToActionsMyComponent;
Usage without glimmer component
//src/ui/components/HelloWorld/component.ts; const stateToComputed = up: statenumberup; const dispatchToActions = ; stateToComputed dispatchToActions;
How do I enable time travel debugging?
-
Install the redux dev tools extension.
-
Enjoy!
Running Tests
yarn
ember test
License
Copyright © 2017 Toran Billups http://toranbillups.com
Licensed under the MIT License