1.1.7 • Published 6 years ago

hyperapp-extended v1.1.7

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

Hyperapp

Hyperapp is a JavaScript library for building web applications.

What's different

hyperapp-extended is hyperapp, but with a few additions.

Actions

Actions have an additional parameter.

// hyperapp
const actions = {
  example: value => (state, actions) => { /* state changes */ },
};

// hyperapp-extended
const actions = {
  example: value => (state, actions, current) => { /* state changes */ },
}

Components

Components have an additional parameter.

// hyperapp
const Component = (attributes, children) => <div />;

// hyperapp-extended
const Component = (attributes, children, current) => <div />;

What is 'current'?

current is an object with two methods:

  • getState() - returns the current app's global state
  • getActions() - returns the current app's global actions
1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago