Socket
Socket
Sign inDemoInstall

@ifaxity/fx

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ifaxity/fx

Custom Element with Vue.js like syntax & features


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@ifaxity/element

What if we could use Vue like features with Webcomponents (Custom Elements, ShadowDOM, HTMLTemplates)?

The result is this, a lit-html powered custom element with a Vue like syntax and reactivity system. All written in Typescript to have the useful typehints in an editor like VSCode.

As this is a WIP and just my hobby project its not ready for serious use yet. Mostly because there is still not a lot of users using a web components ready browser version (~70%).

A lot is going to change in the package so don't expect code to work when you update. More packages for this coming soon like a router and maybe a Flux like store.


Installation:

To install just use your preferred package manager, like npm:

npm install @ifaxity/fx --save


Usage

To use the module just import it like this:

import Fx from '@ifaxity/fx';

And then you can then use the module like this:

import Fx from '@ifaxity/fx';

// Define a element like this
// The tagname is important the element will only render when the browser sees this tagname
Fx.define('hello-world', {
  props: {
    name: {
      type: String,
      default: 'World',
    },
  },
  render(html) {
    return html`
      <h1>Hello ${this.name}!</h1>
    `;
  },
});

// Then it will automatically be rendered in the browser when it detects the tagname.

FAQs

Package last updated on 27 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc