Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rwjblue/ember-functional-component
Use "pure functions" as components in an Ember app.
https://github.com/rwjblue/ember-functional-component
Last synced: 18 days ago
JSON representation
Use "pure functions" as components in an Ember app.
- Host: GitHub
- URL: https://github.com/rwjblue/ember-functional-component
- Owner: rwjblue
- License: mit
- Created: 2019-06-13T16:30:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-21T21:37:23.000Z (over 5 years ago)
- Last Synced: 2024-12-23T18:58:58.324Z (22 days ago)
- Language: JavaScript
- Homepage:
- Size: 166 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ember - ember-functional-component - Attempting to use "pure functions" as components. (Packages / External Components Integration)
README
ember-functional-component
==============================================================================Attempting to use "pure functions" as components. Partially inspired by [vuejs/rfcs#42](https://github.com/vuejs/rfcs/pull/42).
Compatibility
------------------------------------------------------------------------------* Ember.js v3.4 or above
* Ember CLI v3.4 or above
* Node.js v8 or aboveInstallation
------------------------------------------------------------------------------```
ember install ember-functional-component
```Usage
------------------------------------------------------------------------------```js
import { createComponent } from 'ember-functional-component';export default createComponent(props => {
return {
fullName: `${props.first} ${props.last}`,
}
})
``````handlebars
{{this.fullName}}
```The function you provide will be called whenever the incoming arguments change.
Contributing
------------------------------------------------------------------------------See the [Contributing](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).