royale

1.0.3 • Public • Published

Royale.js

v. 0.0.1

Contents
Mount
Component
Event
Known Issues

Mount

.mount(component, target)

This method is used to append a component to the DOM. The component parameter accepts a valid Royale component (see the section on components for further discussion).

Royale Component

//TODO: write this part out...

Events object

Royale.js implements its own eventing system via the Events object. This allows any Royale component to listen for events emitted from any other Royale component, or from the Mount object. As of the current release, the following events are emitted by all Royale components:

mounting

This event is emitted by the very first line of a component's constructor, before any other code runs.

mounted

This event is emitted by the very last line of the component's constructor. Thus, when a Royale component is extended, it will be emitted once a call to the super constructor successfully returns.

rendering

This event is emitted before a component's render method is run by the Mount object (it is emitted by the Component's private ._render method, so any direct invocation of a user-defined .render method will not emit this event unless explicitly told to do so via a call to Events.emit("rendering"))

rendered

This event is emitted after a component's ._render method is invoked by the Mount object (note that it is emitted by the Component's private ._render method, so any direct invocation of a user-defined .render method will not emit this event unless explicitly told to do so via a call to Events.emit("rendering"))

mutating

This event is emitted before a component's .mutate method changes the internal state of a component.

mutated

This event is emitted after a component's .mutate method changes the internal state of a component.

Known Issues:

Passing arrays or other non-primitive values through props will throw an uncaught error

Readme

Keywords

Package Sidebar

Install

npm i royale

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ian.culleton.92