New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ficusjs-renderers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ficusjs-renderers

Minified ES module renderers for FicusJS

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

FicusJS renderers

Minified ES module renderers for FicusJS.

This package provides a tested set of renderers as ES modules to make working with them much easier.

Summary

A renderer function must be provided when creating a new FicusJS component. This allows any renderer to be plugged into a component.

The following renderers have been tested with FicusJS and are available as minified bundles in this package to make working with them much easier.

lit-html

The lit-html renderer is available in this package.

import { html, renderer } from 'https://unpkg.com/ficusjs-renderers@latest/dist/lit-html.js'

createComponent('test-comp', {
  renderer,
  render () {
    return html`
      <div>Some HTML content with ${someVariable}</div>
    `
  }
}

uhtml

The uhtml renderer is available in this package.

import { html, renderer } from 'https://unpkg.com/ficusjs-renderers@latest/dist/uhtml.js'

createComponent('test-comp', {
  renderer,
  render () {
    return html`
      <div>Some HTML content with ${someVariable}</div>
    `
  }
}

htm and Preact

The htm and Preact renderer is available in this package.

import { html, renderer } from 'https://unpkg.com/ficusjs-renderers@latest/dist/htm.js'

createComponent('test-comp', {
  renderer,
  render () {
    return html`
      <div>Some HTML content with ${someVariable}</div>
    `
  }
}

document.createElement

The simple document.createElement renderer is available in this package. In your component, return a template literal string containing HTML.

import { renderer } from 'https://unpkg.com/ficusjs-renderers@latest/dist/create-element.js'

createComponent('test-comp', {
  renderer,
  render () {
    return `
      <div>Some HTML content with ${someVariable}</div>
    `
  }
}

Keywords

ficusjs

FAQs

Package last updated on 28 Oct 2020

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