Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    reactify-dom-stylepublic

    reactify-dom-style

    This module exports a single function which simply creates a React-compatible style object from a DOM node's computed style. The function itself has zero dependencies; if you want, you can just copy the function from the src/module/reactify-dom-style.js file and paste it into your code.

    Example usage in a React render function:

    var reactifyDOMStyle = require('reactify-dom-style');

    ...

    render(){ var sourceStyle = reactifyDOMStyle(document.getElementById('someNodeId'));

    return

    I'm in the style of the other DOM node.

    ; }

    ...

    To build the JS for demo/index.html, run the following commands in this project's root directory:

    Initial Install:

    'npm install'

    Activate Auto-Build:

    'node build'

    install

    npm i reactify-dom-style

    Downloadsweekly downloads

    0

    version

    2.0.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar