skatejs / skatejs.github.io

[DEPRECATED] - SkateJS library, components and extensions.
MIT License
5 stars 3 forks source link

Add vdom function examples to code samples #4

Open treshugart opened 7 years ago

treshugart commented 7 years ago

This should be in the JS tab and we should have a separate tab for JSX.

The examples have something like:

skate.define('x-test', {
  render() {
    <div />
  }
});

Thos should be moved to a "JSX" tab and and we should include in the "JS" tab:

const ['div'] = skate.vdom.builder('div');
skate.define('x-test', {
  render() {
    div();
    // or
    skate.h('div');
  }
});

Is using the builder API better to show than using skate.h?

Hotell commented 7 years ago

Why not rather using skate.h instead of skate.vdom in "JS" tab ?

P.S.: vdom.element and vdom.text are deprecated in docs

treshugart commented 7 years ago

@Hotell this issue was created pre-deprecation. I'll update.