How to use driver-server - 1 common examples

To help you get started, we’ve selected a few driver-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / rax / packages / rax / src / testing / renderer.js View on Github external
create(element) {
    let container = ServerDriver.createBody();
    let rootComponent = Instance.mount(element, container, {});
    let renderedComponent = rootComponent.getRenderedComponent();

    renderedComponent.toJSON = () => {
      return new Serializer(container).toJSON();
    };

    renderedComponent.getInstance = () => {
      return renderedComponent._instance;
    };

    renderedComponent.update = (element) => {
      Instance.mount(element, container, {});
    };

    renderedComponent.unmount = () => {

driver-server

Server driver for Rax

BSD-3-Clause
Latest version published 6 years ago

Package Health Score

57 / 100
Full package analysis

Popular driver-server functions