Socket
Socket
Sign inDemoInstall

inferno

Package Overview
Dependencies
Maintainers
1
Versions
334
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

package.json
{
"name": "inferno",
"description": "A framework for building lightning fast user interfaces",
"version": "0.4.3",
"version": "0.4.4",
"license": "MPL-2.0",

@@ -6,0 +6,0 @@ "author": {

# InfernoJS
[![Build Status](https://travis-ci.org/trueadm/inferno.svg?branch=dev)](https://travis-ci.org/trueadm/inferno)
[![Build Status](https://travis-ci.org/trueadm/inferno.svg?branch=master)](https://travis-ci.org/trueadm/inferno)
[![Coverage Status](https://coveralls.io/repos/trueadm/inferno/badge.svg?branch=master&service=github)](https://coveralls.io/github/trueadm/inferno?branch=master)

@@ -172,29 +172,31 @@ [![Dependency Status](https://david-dm.org/trueadm/inferno.svg)](https://david-dm.org/trueadm/inferno)

class BasicComponent extends Inferno.Component {
render() {
const template = Inferno.createTemplate((name, title) =>
TemplateFactory("div", {
className: "basic"
},
TemplateFactory("span", {
className: name
}, "The title is ", title)
)
);
return template(this.props.name, this.props.title);
}
const { createElement } = Inferno.TemplateFactory;
class BasicComponent extends Inferno.Component {
render() {
const template = Inferno.createTemplate((name, title) =>
createElement('div', {
className: 'basic'
},
createElement('span', {
className: name
}, 'The title is ', title)
)
);
return template(this.props.name, this.props.title);
}
const template = Inferno.createTemplate((Component, title) =>
TemplateFactory('div', null,
TemplateFactory(Component, {
title: title,
name: "basic-render"
})
)
);
}
const template = Inferno.createTemplate((Component, title) =>
createElement('div', null,
createElement(Component, {
title: title,
name: 'basic-render'
})
)
);
Inferno.render(template(BasicComponent, 'abc'), container);
```
Inferno.TemplateFactory is hyperscript function that works the same way as React.creactElement(). It's first argument is the node, second argument is the attributes and the third and last argument is it's children.
`Inferno.TemplateFactory` provides a factory `createElement()` function that can be used to build up virtual DOM structures in a similar sense to how `React.creactElement()` works. It's first argument is the node, second argument is the attributes and all remaining arguments are it's children.

@@ -201,0 +203,0 @@ ### Inferno.createRef

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