GithubHelp home page GithubHelp logo

html-element-to-react's Introduction

html-element-to-react

Convert HTML DOM elements to React

npm i --save html-element-to-react

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import { convert } from 'html-element-to-react'

const App = convert(htmlElement)

ReactDOM.render(App, document.getElementById('app'))

html-element-to-react's People

Contributors

mohitk05 avatar kunalpanchal avatar dependabot[bot] avatar

Stargazers

 avatar fanyang avatar JaspreetKaberwal avatar Biplab Malakar avatar

Watchers

James Cloos avatar

Forkers

nullset

html-element-to-react's Issues

Breaks expo

merely installing this module makes my Expo app break. I get something like:

# npm start

@ start /Users/ekkis/dev/tst
expo start

Starting project at /Users/ekkis/dev/tst
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
Error: React Native is not installed. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: expo start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ekkis/.npm/_logs/2020-02-06T02_01_02_562Z-debug.log

if I remove the module, app works again. is it fixable?

Provide coverage certain HTML elements

Currently the converter covers limited HTML tags which do not allow children or textContent, e.g. <img> and misses tags like <video>, <input> etc. Not an urgent issue, but will have to be solved whenever new tags show up in the content.

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.