ember-reactive-helpers

所属分类:collect
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-03-14 19:45:54
上 传 者sh-1993
说明:  帮助使用Ember.js.进行 React模板编程的助手集合。,
(Collection of helpers to aid in reactive template programming with Ember.js.,)

文件列表:
.editorconfig (367, 2023-03-14)
.ember-cli (525, 2023-03-14)
.eslintignore (338, 2023-03-14)
.eslintrc.js (1103, 2023-03-14)
.npmignore (582, 2023-03-14)
.prettierignore (346, 2023-03-14)
.prettierrc (1006, 2023-03-14)
.template-lintrc.js (62, 2023-03-14)
.watchmanconfig (37, 2023-03-14)
CHANGELOG.md (2219, 2023-03-14)
CONTRIBUTING.md (698, 2023-03-14)
LICENSE.md (1066, 2023-03-14)
addon/ (0, 2023-03-14)
addon/helpers/ (0, 2023-03-14)
addon/helpers/debounce.js (428, 2023-03-14)
addon/helpers/feed.js (240, 2023-03-14)
addon/helpers/r.js (1209, 2023-03-14)
addon/helpers/r/ (0, 2023-03-14)
addon/helpers/r/debugger.js (425, 2023-03-14)
addon/helpers/r/get.js (515, 2023-03-14)
addon/helpers/r/log.js (252, 2023-03-14)
addon/helpers/r/param.js (281, 2023-03-14)
addon/helpers/r/tap.js (192, 2023-03-14)
addon/helpers/shhh.js (164, 2023-03-14)
addon/helpers/transition-to.js (1124, 2023-03-14)
app/ (0, 2023-03-14)
app/helpers/ (0, 2023-03-14)
app/helpers/feed.js (69, 2023-03-14)
app/helpers/r.js (68, 2023-03-14)
app/helpers/r/ (0, 2023-03-14)
app/helpers/r/debugger.js (80, 2023-03-14)
app/helpers/r/get.js (70, 2023-03-14)
... ...

# ember-reactive-helpers [![NPM Version][npm-badge-img]][npm-badge-link] [![Build Status][build-status-img]][build-status-link] [![Ember Observer Score][ember-observer-badge]][ember-observer-url] [![Download Count][npm-downloads-img]][npm-badge-link] Collection of helpers to aid in reactive template programming with Ember.js. ## Installation ``` ember install ember-reactive-helpers ``` ## Introduction Reactive helpers are helpers that return functions. These functions can be bound to event handlers to process data on the way up in the Data Down Actions Up cycle. The `r` helper makes it possible to use [`ember-composable-helpers`](https://github.com/DockYard/ember-composable-helpers) in event handlers where execution of the helper is delayed until the event is triggered. ## Helpers ### `(r helper [arg1 arg2 ...])` Returns a function for a given helper and curries arguments to it. ```hbs ``` The `r` helper accepts functions as helpers. For example, let's say you have a method in a Component named `addNumbers` ```js export default class extends Component { addNumbers([a, b]) { return a + b; } } ``` You can use it in the template. ```hbs
{{this.count}}
``` ### `(r/get propName)` The `(r/get)` helper returns a function. When called, the function will return the value taken from the object that it receives as the first argument at property propName. ```hbs {{compute (r/get "animal") (hash animal="cat")}} {{! //=> cat }} ``` ### `(r/param [index])` `(r/param)` returns a function. When called, this function will return the received argument at the specified index. ```hbs {{compute (r/param) "hello" "world"}} {{! //=> 'hello'}} {{compute (r/param 1) "hello" "world"}} {{! //=> 'world'}} ``` ### `(r/debugger)` `(r/debugger)` will create a helper that will inject a debugger breakpoint into a helper pipe. It will pass through the value, that's passed into the helper. ```hbs ``` ### `(r/log ['your message'])` The `(r/log)` helper will evaluate to a function. When called, this function will log the passed in message and arguments that it received. ```hbs ``` ### `(r/tap value)` The `(r/tap value)` helper will evaluate to a function that will return the passed in argument. ### `{{shhh anything}}` The `{{shhh` helper will suppress any output that's passed into it. This is useful when you want to compute a helper without having its output rendered. ### `(transition-to 'destination' model (query-params foo='bar'))` The `(transition-to)` helper has the same argument signature as `link-to` but evaluates to an action that can be called to trigger transition. ```hbs ``` ## Helpful Links - ### [Live Demo](http://EmberSherpa.github.io/ember-reactive-helpers) - ### [Changelog](CHANGELOG.md) ## Looking for help? If you encounter a bug [please open an issue on GitHub](http://github.com/EmberSherpa/ember-reactive-helpers/issues). ## Compatibility - Ember.js v3.28 or above - Ember CLI v3.28 or above - Node.js v14 or above ## Contributing See the [Contributing](CONTRIBUTING.md) guide for details. ## License This project is licensed under the [MIT License](LICENSE.md). [npm-badge-img]: https://badge.fury.io/js/ember-reactive-helpers.svg [npm-badge-link]: http://badge.fury.io/js/ember-reactive-helpers [build-status-img]: https://github.com/EmberSherpa/ember-reactive-helpers/workflows/CI/badge.svg?branch=master&event=push [build-status-link]: https://github.com/EmberSherpa/ember-reactive-helpers/actions?query=workflow%3A%22CI%22 [npm-downloads-img]: https://img.shields.io/npm/dt/ember-reactive-helpers.svg [ember-observer-badge]: http://emberobserver.com/badges/ember-reactive-helpers.svg [ember-observer-url]: http://emberobserver.com/addons/ember-reactive-helpers

近期下载者

相关文件


收藏者