New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zliq

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zliq

slim and quick framework in low loc

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-71.08%
Maintainers
1
Weekly downloads
 
Created
Source

zliq logo

ZLIQ

Dependencies CircleCI version downloads MIT License

Code Climate Test Coverage gzip size size module formats: es, umd

All Contributors Watch on GitHub Star on GitHub

ZLIQ is the intent to create an easy to understand, easy to use web framework. It is based on reactive-streams and reactive-dom-rendering. ZLIQ has few lines of code (~580 November 2017).

Website

Why yet another web framework?

Modern web frameworks got really big (React + Redux 139Kb and Angular 2 + Rx 766Kb, [src]). As a developer I came into the (un)pleasent situation to teach people how these work. But I couldn't really say, as I haven't actually understood each line of code in these beasts. But not only that, they also have a lot of structures I as a developer have to learn to get where I want to go. It feels like learning programming again just to be able to render some data.

ZLIQ tries to be sth simple. Sth that reads in an evening. But that is still so powerful you can just go and display complex UIs with it. Sth that feels more JS less Java.

Still ZLIQ doesn't try to be the next React or Angular! ZLIQ has a decent render speed even up to several hundred simultaneous updates but it's not as fast as Preact. And it on purpose does not solve every problem you will ever have. ZLIQ is a tool to help you create the solution that fits your need.

Quickstart

To play around with ZLIQ fork this repo and start the demo page at localhost:8080:

$ npm start

To use ZLIQ in your project, first install it as an dependency:

$ npm install --save zliq

Then create your app component and add it to the DOM:

import {h, render} from 'zliq';

let app = <div>
        <span>Hello World</span>
    </div>;
render(app, document.querySelector('#app');

ZLIQ includes streams similar to flyd to make state easy to handle:

import {h, render} from 'zliq';

// define a stream of state
let state$ = stream({ clicks: 0 });

// Redux like action
let increment = (state$) => () => {
    state$.patch({ clicks: state$.$('clicks')() + 1 })
};
            
let app = <div>
    // display from state
    <p>Clicks: {state$.$('clicks')}</p>
    // interact with state
    <button onclick={increment(state$)}>Click + 1</button>
</div>;
render(app, document.querySelector('#app');

Make sure your stack converts JSX to Hyperscript syntax. In the ZLIQ project this is achieved with Babel and the transform-h-jsx plugin used in webpack. Alternative you can use Babel in the browser, like I did in the ZLIQ playground.

If you don't want to use JSX you can still write plain Hyperscript:

let app = h('div', null, [
    h('span', null, ["Hello World"])
]);

Dive in

Checkout the Git Page as a live example of a ZLIQ app (the code lives under ./demo). There you will also find a tutorial and more detailed descriptions on ZLIQs parts.

Plugins

There are some plugins available to enhance the zliq experience:

Contributors

Thanks goes to these wonderful people (emoji key):


Fabian

💻 🎨 📖 ⚠️

Ferit Topcu

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Logo based on: http://www.iconsfind.com/2015/11/25/candy-dessert-food-sweet-baby-icon/

FAQs

Package last updated on 18 Nov 2018

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