-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,397 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Documentation | ||
|
||
* [Getting Started](/docs/getting-started.md) | ||
* [Hyperx](/docs/hyperx.md) | ||
* [JSX](/docs/jsx.md) | ||
* [Virtual Nodes](/docs/virtual-nodes.md) | ||
* [Custom Tags](/docs/custom-tags.md) | ||
* [Applications](/docs/applications.md) | ||
* [View and State](/docs/applications.md#view-and-state) | ||
* [Actions](/docs/applications.md#actions) | ||
* [Namespaces](/docs/applications.md#namespaces) | ||
* [Events](/docs/applications.md#events) | ||
* [Custom Events](/docs/applications.md#custom-events) | ||
* [Plugins](/docs/applications.md#plugins) | ||
* [Lifecycle Events](/docs/lifecycle-events.md) | ||
* [oncreate](/docs/lifecycle-events.md#oncreate) | ||
* [onupdate](/docs/lifecycle-events.md#onupdate) | ||
* [onremove](/docs/lifecycle-events.md#onremove) | ||
* [Router](/docs/router.md) | ||
* [actions](/docs/router.md#actions) | ||
* [go](/docs/router.md#actions-go) | ||
* [state](/docs/router.md#state) | ||
* [params](/docs/router.md#state-params) | ||
* [match](/docs/router.md#state-match) | ||
* [events](/docs/router.md#events) | ||
* [route](/docs/router.md#events-route) | ||
* [Tutorials](/docs/tutorials.md) | ||
* [Counter](/docs/counter.md) | ||
* [Countdown Timer](/docs/countdown-timer.md) | ||
* [Gif Search](/docs/gif-search.md) | ||
* [API](/docs/api.md) | ||
* [h](/docs/api.md#h) | ||
* [app](/docs/api.md#app) | ||
* [state](/docs/api.md#state) | ||
* [view](/docs/api.md#view) | ||
* [actions](/docs/api.md#actions) | ||
* [[_namespace._]action](/docs/api.md#actions-action) | ||
* [events](/docs/api.md#events) | ||
* [loaded](/docs/api.md#events-loaded) | ||
* [action](/docs/api.md#events-action) | ||
* [update](/docs/api.md#events-update) | ||
* [render](/docs/api.md#events-render) | ||
* [plugins](/docs/api.md#plugins) | ||
* [Plugin](/docs/api.md#plugins-plugin) | ||
* [root](/docs/api.md#root) | ||
* [emit](/docs/api.md#emit) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# API | ||
|
||
* [h](#h) | ||
* [app](#app) | ||
* [state](#state) | ||
* [view](#view) | ||
* [actions](#actions) | ||
* [[_namespace._]action](#actions-action) | ||
* [events](#events) | ||
* [loaded](#events-loaded) | ||
* [action](#events-action) | ||
* [update](#events-update) | ||
* [render](#events-render) | ||
* [plugins](#plugins) | ||
* [Plugin](#plugins-plugin) | ||
* [root](#root) | ||
* [emit](#emit) | ||
|
||
## <a name="h"></a> h | ||
|
||
Type: <samp>([tag](#h-tag), [data](#h-data), [children](#h-children)): [vnode](#vnode)</samp> | ||
|
||
* <a name="h-tag"></a>**tag**: <samp>string | ([props](#h-data), [children](#h-children)): [vnode](#vnode)</samp> | ||
* <a name="h-data"></a>**data**: <samp>object</samp> with [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes), [styles](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference), [events](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers), [lifecycle events](/docs/lifecycle-events.md). | ||
* <a name="h-children"></a>**children**: <samp>string | Array\<[vnode](#vnode)\> | ||
* <a name="vnode"></a>**vnode**: a [virtual node](/docs/virtual-nodes.md). | ||
|
||
## <a name="app"></a> app | ||
|
||
Type: <samp>([props](#app-props))</samp> | ||
|
||
* <a name="app-props"></a> **props** | ||
* [state](#state) | ||
* [view](#view) | ||
* [actions](#actions) | ||
* [events](#events) | ||
* [plugins](#plugins) | ||
* [root](#root) | ||
|
||
<a name="app-props"></a> | ||
|
||
### <a name="state"></a> state | ||
|
||
Type: <samp>Any</samp> | ||
|
||
### <a name="view"></a> view | ||
|
||
Type: <samp>([state](#state), [actions](#actions)): [vnode](#vnode)</samp> | ||
|
||
### <a name="actions"></a> actions | ||
#### <a name="actions-action"></a> [_namespace._]action | ||
|
||
Type: <samp>([state](#state), [actions](#actions), [data](#actions-data), [emit](#emit))</samp> | ||
|
||
* <a name="actions-data"></a> **data**: the data passed to the action. | ||
|
||
```jsx | ||
actions: { | ||
foo: { | ||
bar: (state, actions, data, emit) => {} | ||
} | ||
} | ||
|
||
actions.foo.bar(data) | ||
``` | ||
|
||
### <a name="events"></a> events | ||
#### <a name="events-loaded"></a> loaded | ||
|
||
Type: <samp>([state](#state), [actions](#actions), _, [emit](#emit)) | Array\<[Type](#events-loaded)\></samp> | ||
|
||
Fired after the view is mounted on the DOM. | ||
|
||
#### <a name="events-action"></a> action | ||
|
||
Type: <samp>([state](#state), [actions](#actions), [data](#events-action-data), [emit](#emit)): [data](#events-action-data) | Array\<[Type](#events-action)\></samp> | ||
|
||
* <a name="events-action-data"></a>**data** | ||
* **name**: the name of the action. | ||
* **data**: the data passed to the action. | ||
|
||
Fired before an action is triggered. | ||
|
||
#### <a name="events-update"></a> update | ||
|
||
Type: <samp>([state](#state), [actions](#actions), [data](#events-update-data), [emit](#emit)): [data](#events-update-data) | Array\<[Type](#events-update)\></samp> | ||
|
||
* <a name="events-update-data"></a>**data**: the updated fragment of the state. | ||
|
||
Fired before the state is updated. | ||
|
||
#### <a name="events-render"></a> render | ||
|
||
Type: <samp>([state](#state), [actions](#actions), [data](#events-render-data), [emit](#emit)): [data](#events-render-data) | Array\<[Type](#events-render)\></samp> | ||
|
||
* <a name="events-render-data"></a>**data**: the [view](#view) function. | ||
|
||
Fired before the view is rendered. | ||
|
||
### <a name="plugins"></a> plugins | ||
|
||
Type: <samp>Array\<[Plugin](#plugins-plugin)\></samp> | ||
|
||
#### <a name="plugins-plugin"></a> Plugin | ||
|
||
Type: <samp>([props](#app-props)): [props](#plugin-props)</samp> | ||
|
||
* <a name="plugin-props"></a> **props** | ||
* [state](#state) | ||
* [actions](#actions) | ||
* [events](#events) | ||
|
||
### <a name="root"></a> root | ||
|
||
Type: <samp>[Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) = [document.body](https://developer.mozilla.org/en-US/docs/Web/API/Document/body)</samp> | ||
|
||
## <a name="emit"></a> emit | ||
|
||
Type: <samp>([event](#emit-event), [data](#emit-data)): [data](#emit-data)</samp> | ||
|
||
* <a name="emit-event"></a> **event**: the name of the event. | ||
* <a name="emit-data"></a> **data**: the data passed to the event. |
Oops, something went wrong.