Skip to content

Webcomponent for interacting with Firebase, inspired by polymerfire, but based on lit-element

License

Notifications You must be signed in to change notification settings

preignition/lit-firebase

Repository files navigation

<preignition/lif>

This webcomponent follows the open-wc recommendation.

A lit-element based implementation of polymerfire.

For the time being, only firebase-document and firebase-query have been migrated (to resp. lif-document and lif-query). firebase-auth and firebase-app will not be upgraded as it is usually simpler to instantiate database and handle authentication via js.

Those components require firebase SDK to be made available on the client (see https://firebase.google.com/docs/web/setup).

Use at your own risks as this is beta product.

Installation

npm i @preignition/lifbase

Usage

<script type="module">
  import '@preignition/lifbase';
</script>

and in lit-element render: 

<lif-document path="myPath" @data-changed="${e=> this.data = e.detail.value}"></lif-document>
<lif-query path="myPath" @data-changed="${e=> this.data = e.detail.value}"></lif-query>

Testing with Karma

To run the suite of karma tests, run

npm run test

or to run them in compatibility mode for legacy browsers

npm run test:compatibility

To run the tests in watch mode (for TDD, for example), run

npm run test:watch

or

npm run test:compatibility

About

Webcomponent for interacting with Firebase, inspired by polymerfire, but based on lit-element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published