Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kut

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kut

A simple react-like web-view rendering library

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Kut

npm travis-ci

This is a simple React-like web-view rendering library, developed when I learnt the source codes of React. Currently Kut supports two top-level methods, that's createElement and render, and also supports component-based development with class Component. Already cover some development requirements, and the home page was built based on Kut with acceptable performance. Kut improved the diff algorithm of React.

Take my hat off to React, especially to the React Fiber. Kut is still under maintenance on my own, and will support the features like Context and Portal in the future. Free to pull request, and besides, welcome all your stars (lol).

Usage

You can just copy the demo as a template, and build your app based on it.

# clone from github
git clone https://github.com/Siubaak/kut
# cp the demo as a template
cp kut/demo my-kut-app
# cd into the demo directory
cd my-kut-app
# install all dependencies
npm i
# pack and serve locally at port 1234
npm start

If you use webpack or parcel for module-based development, you could install from npm and import it. If you use Babel to transform the JSX, it's better to import as React, so you don't need to change the config for babel/preset-react.

Install from npm.

npm i -S kut

And then import.

import React from 'kut'

Or, you can simple source at your html file, and the minimized file can be found at release. Download it and unzip, then you can find kut/dist/min/kut.min.js and source it as follow.

<div id="root"></div>

<script type="text/javascript" src="kut.min.js"></script>
<script type="text/javascript">
const node = Kut.createElement('p', {
  style: {
    height: '50px',
    backgroundColor: '#eee',
  }
}, 'Hello World!')

Kut.render(node, document.getElementById('root'))
</script>

Demo & Docs

I've made a home page for Kut, built with Kut. You can find a TodoList demo and the docs for Kut.

Just see https://siubaak.github.io/kut

Development

If you want to contibute to Kut, just clone it down, develop on it and pull request.

# clone from git
git clone https://github.com/Siubaak/kut
# cd into the kut directory
cd kut
# install all dependencies
npm i

# compile the typescript and watch the change of files
npm start
# or bundle up the dev file with sourcemap by webpack
# and watch the change of files
npm run webpack
# or build the files for production
npm run build

References

License

Kut is licensed under the MIT.

Keywords

FAQs

Package last updated on 06 Apr 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