GithubHelp home page GithubHelp logo

skatejs / kickflip Goto Github PK

View Code? Open in Web Editor NEW
11.0 8.0 1.0 1.68 MB

[DEPRECATED] - Functional web components based on the W3C web component specifications.

License: MIT License

JavaScript 98.84% HTML 1.06% CSS 0.10%

kickflip's Issues

The kickflip() custom element name should be optional.

If it is optional, kickflip() should return a function that accepts a name which will return a constructor.

This should still be supported:

const MyElement = kickflip('my-element', {
  render () {}
});

However we should support this:

const defineMyElement = kickflip({
  render () {}
});

const MyElement = defineMyElement('alternate-name');

Export incremental-dom functions from src/vdom

This would allow consumers to use any templating language that compiles down to Incremental DOM while keeping the way we've configured it to run.

This means they can:

import { elementOpen, ... } from 'kickflip/src/vdom';

Move special behaviour from VDOM factories into Incremental DOM handlers

We currently check some attributes in the factory functions and apply them in different ways depending on what they are. Instead, we should create Incremental DOM attribute handlers for them and handle them at that level. This would enable JSX -> IDOM compilation to take on the same semantics as our VDOM functions.

Spike using Virtual DOM instead of our own implementation.

It'd be nice to not have to maintain our own implementation, so we should spike using Virtual DOM as the defacto diff / patch implementation for this.

However, there are some advantages to our implementation we should consider:

  1. It's smaller.
  2. It can diff real DOM and virtual DOM interchangeably.
  3. On initial investigation it seems smarter about attribute / property setting.
  4. Does Virtual DOM bind events?

Number 2 and 4 are a must and we can probably work around number 3. Number 1 isn't very important as it's not that much smaller (30k unmin or so).

The biggest priority is ensuring that we can still do element.appendChild(node) and not lose a reference to node during the rendering process. Maybe due to the nature of the patching process and doing as little transformations as possible, this is not possible. Need to investigate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.