0.1.0 • Published 10 months ago

frontinjs v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

frontin.js

npm

What is?

A javascript library for create Functional Stateless Components and render with Virtual DOM. Ideal for creating ultra light and fast applications with Redux.

Features

  • Functional Components.
  • Custom Props for manage unidirectional data flow.
  • Virtual DOM Render.
  • Easy select real DOM nodes with global Refs.
  • Compatible with JSX.
  • Easy integration with Redux.

How to use?

Install

Tip: Verify if you have node and npm installed.

$ npm install frontinjs --save-dev

Setup

ES6/ECMAScript 2015 module:

Tip: Use Webpack (or similar module bundler) to manage the components.

import frontin from 'frontinjs';

CommonJS module:

Tip: Use Browserify (or similar module bundler) to manage the components.

const frontin = require('frontinjs');

Create stateless components

import frontin from 'frontinjs';

function Hello() {

  return (
    frontin.component(
      'h1',
      { className: 'foo' },
      'Hello World'
    )
  )

}

Tip: Use JSX to write your component declaratively.

import frontin from 'frontinjs';

function Hello() {

  return (
    <h1 className = "foo">
      Hello World
    </h1>
  )

}

Render with Virtual DOM

import frontin from 'frontinjs';

function Hello() {
  // Markup
}

frontin.render(<Hello />, document.getElementById('root'));

Development

Getting started

Clone this repository and install its dependencies:

$ git clone https://github.com/afonsopacifer/frontinjs.git
$ cd frontinjs
$ npm install

Build

Builds the library to dist:

$ npm run build

Tests

Run all unit tests:

$ npm test

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.

Contributing

Want to contribute? Follow these recommendations.

History

See Releases for detailed changelog.

License

MIT License © Afonso Pacifer

0.1.0

10 months ago