0.1.1 • Published 4 years ago
reactive-fast-element v0.1.1
Purpose
To align with the Lit development teams proposal for ReactiveController and ReactiveControllerHosts.
https://lit.dev/docs/composition/controllers/
Installation
npm install reactive-fast-element
# OR
yarn add reactive-fast-elementGetting Started
To get started with reactive-fast-element, the easiest
way is to use the provided base class.
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.
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
Local Development
git clone https://github.com/ParamagicDev/reactive-fast-element
cd reactive-fast-element
pnpm installStart a Dev Server
pnpm startTesting
pnpm test