Coder Social home page Coder Social logo

superpie's Introduction

SUPERPIE for superfine v6

As superfine updates to v7 several unreconcilable changes push superpie to 6.*

this readme is not completed yet

Lightweight library based on superfine.

Why?

Superfine is tiny vdom library used to build web interfaces. It comes with the minimum features to provide flexibility and simplicity. But when facing any serious development you need at least to add several features such as state management and styling.

This library size is only 717 Bytes and is the perfect complement to superfine if you want to quickly develop simple and blazing fast web apps.

Samples
  • Form - Form management and state binding as a component.
  • Router - HTML5 history API management as a component.
  • Select - Native <select/> tag with filter and scoped styles.
What does it include?
  • scoped state
import { h } from 'superfine';
import { statefine } from "superpie";

const Counter = statefine(({ state, setState }) => (
  <div oncreate={() => setState({ amount: 0 })}>
    <p>
      <span>{state.amount}</span>
      <a onclick={() => setState(prev => ({ amount: prev.amount + 1 }))}>+</a>
    </p>
  <div>
))
  • scoped css
import { h } from 'superfine';
import { stylefine } from "superpie";

const FancyButton = stylefine(
  `
    button {
      cursor: pointer;
      border-style: none;
      padding: .5rem;
      margin: 0 .5rem .5rem 0;
    }

  `,
  ({ children, ...props }) => (
    <button {...props}>{children}</button>
  )
)
  • cheap classy syntax
import { h } from 'superfine';
import { cyclefine } from "superpie";

const DisplayMessage = cyclefine({
  // this is a superfine component hook
  oncreate() {
    SomeService.fetch().then(res =>
      this.setState({ message: res.message }));
  },
  onrender() {
    const message = this.state && this.state.message
    return (
      <div>
        {message}
      </div>
    )
  }
})

superpie's People

Contributors

k1r0s avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.