Valyrian.js 5.0.8

Get started - Plugins

What is Valyrian.js?InstallationHyperscript/JSXComponentsLifecycle methodsDirectivesServer side jsxPlugins

Plugins

Valyrian.js comes with a very simple but very powerfull plugin system. You can extend its core functionality or change it completely by the use of plugins.

Using plugins

You can use any Valyrian.js plugin by passing it to the v.usePlugin() method.
v.usePlugin(MyPlugin, options);

Creating plugins

A Valyrian.js plugin is a module that exports a single function that will be called with the v constructor and with an optional options object if any.
const Plugin = (v, options) => {
    v.myPluginMethod = function(){
        // Some awesome code
    };
};

module.exports = Plugin;