Skip to content
Use "pure functions" as components in an Ember app.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
addon
app
config
tests
types
vendor
.editorconfig
.ember-cli
.eslintignore
.eslintrc.js
.gitignore
.npmignore
.prettierrc
.template-lintrc.js
.travis.yml Add yarn lint:ts script. Jun 13, 2019
.watchmanconfig
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
RELEASE.md
ember-cli-build.js
index.js
package.json
testem.js
tsconfig.json
yarn.lock

README.md

ember-functional-component

Attempting to use "pure functions" as components. Partially inspired by vuejs/rfcs#42.

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v3.4 or above
  • Node.js v8 or above

Installation

ember install ember-functional-component

Usage

import { createComponent } from 'ember-functional-components';

export default createComponent(props => {
  return {
    fullName: `${props.first} ${props.last}`,
  }
})

The function you provide will be called whenever the incoming arguments change.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

You can’t perform that action at this time.