Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konnorrogers/reactive-fast-element
A reactive controller for FAST meant to simulate Lit's reactive controllers.
https://github.com/konnorrogers/reactive-fast-element
Last synced: 5 days ago
JSON representation
A reactive controller for FAST meant to simulate Lit's reactive controllers.
- Host: GitHub
- URL: https://github.com/konnorrogers/reactive-fast-element
- Owner: KonnorRogers
- Created: 2021-12-07T00:58:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-12T06:04:49.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T06:01:58.095Z (20 days ago)
- Language: TypeScript
- Size: 291 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Purpose
To align with the Lit development teams proposal for
ReactiveController and ReactiveControllerHosts.## Installation
```bash
npm install reactive-fast-element# OR
yarn add reactive-fast-element
```## Getting Started
To get started with `reactive-fast-element`, the easiest
way is to use the provided base class.```js
import { customElement } from "@microsoft/fast-element"
import { ReactiveFASTElement } from "reactive-fast-element"@customElement({
name: "my-element"
})
class MyElement extends ReactiveFASTElement {}
```This allows you to then attach `ReactiveControllers` for
use by your element.Alternatively, `reactive-fast-element` ships a base mixin
for you to use if you dont want to use the base class.```js
import { FASTElement, customElement } from "@microsoft/fast-element"
import { FASTReactiveMixin } from "reactive-fast-element"@customElement({
name: "my-element"
})
class MyElement extends FASTReactiveMixin(FASTElement) {}
```## Examples
For some examples of using `reactive-fast-element`,
checkout the [/src/examples directory](/src/examples)## Local Development
```bash
git clone https://github.com/ParamagicDev/reactive-fast-element
cd reactive-fast-element
pnpm install
```### Start a Dev Server
```bash
pnpm start
```### Testing
```bash
pnpm test
```