0.4.0 • Published 3 years ago

@wttech/graal-bridge v0.4.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Graal Javascript renderer

Javascript execution entrypoint.

Usage

Add dependency to package.json.

"dependencies": {
    "@wttech/graal-bridge": "1.0.0"
},

Inside the script import React components, register them and expose the render function.

// import the Graal templating bridge
import GraalBridge from '@wttech/graal-bridge';

// import React components 
import ComponentA from 'ComponentA';
import ComponentB from 'ComponentB';

const templating = new GraalBridge();

// register React components
templating.registerReact('componentA', ComponentA);
templating.registerReact('componentB', ComponentB);

// exposse the render function to be invoked by the Javascript renderer
templating.expose();

License

Graal templating bridge is licensed under Apache License, Version 2.0.

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago