0.3.2 • Published 3 years ago

fullyjs v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

FullyJS

This repo is for learning purposes Transformice Emoticon No9

The idea of this project is a short way of web programming with only javascript.

Look at its potential:

let clicks = 0

const Message = p({
  getProps: () => ({
    innerText: `Clicks: ${clicks}`
  })
})

const Counter = div({
  getChilds: () => [
    Message,
    button({
      getProps: () => ({
        innerText: 'Add clicks',
        onclick: () => {
          clicks++
          Message().update()
        }
      })
    })
  ]
})

Installation guide

You can use it with vite vanilla:

npm init vite@latest fullyjs-test -- --template vanilla

Then add the package:

npm install fullyjs

Ready! you can already use it in src/main.js

import { autoElements, mountFullyJs } from 'fullyjs'
const { div, button } = autoElements

let counter = 0

const Button = button({
  getProps: () => ({
    innerText: `${counter} clicks.`,
    onclick: () => {
      counter++
      Button().update()
    }
  })
})

const Home = div({
  getProps: () => ({ innerText: 'Hello world!' }),
  getChilds: () => [Button]
})

mountFullyJs('#app', Home)
0.3.2

3 years ago

0.3.1

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago