Giter Site home page Giter Site logo

jsonml-to-react-element's People

Contributors

benjycui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jsonml-to-react-element's Issues

JsonML component to React component converter?

Nice library.
I have ton of JsonML stateless components. Each component basically takes parameters and returns JsonML Array.
I was thinking about the best way to wrap / convert JsonML components into React components.
I would appreciate any ides how it can be done.

Babel configuration in package.json interferes with Webpack

I'm running Webpack with Babel in my project, but not using the ES2015 preset. Webpack gives me this error:

ERROR in ./node_modules/jsonml-to-react-element/lib/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Couldn't find preset "es2015" relative to directory "/Users/reidar/projects/djupvik.digital/node_modules/jsonml-to-react-element"

I believe this error message is because of the Babel configuration in the bundled package.json:

  "babel": {
    "presets": [
      "es2015"
    ]
  },

Invariant Violation: img is a void element tag

I am getting Unhandled rejection Invariant Violation: img is a void element tag and must neither have children nor use dangerouslySetInnerHTML. as error.

I think this is happening because the img tag is getting converted to <img src="" alt> instead of getting converted to <img src="" alt />. The absence of closing tag is making React throw this error is my guess.

Or is it possible that I am doing something wrong here?

Can you confirm whether img tag gets converted to <img> or <img /> ?
Thanks!

BR is a void element

I am getting the following error
Unhandled rejection Invariant Violation: br is a void element tag and must neither have "children" nor use "dangerouslySetInnerHTML".
My JsonML is the following:

    [
        "H4",
        {
            "style": "line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
        },
        [
            "BR"
        ]
    ]

Please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.