Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

Make JSXFromHTML stateless #4

Open
RafalFilipek opened this issue Apr 11, 2017 · 2 comments
Open

Make JSXFromHTML stateless #4

RafalFilipek opened this issue Apr 11, 2017 · 2 comments

Comments

@RafalFilipek
Copy link
Owner

After last changes where I made JSXFromHTML synchronous there no reason to keep componentDidMount etc. In fact we can make this component stateless.

Props:

  • less code

Cons:

  • ?
@jaredpalmer
Copy link
Contributor

jaredpalmer commented Apr 11, 2017

What happens if htmlparser2 fails? What does it return?

@RafalFilipek
Copy link
Owner Author

Good question. should be an empty array IMO. I was trying to generate some error with invalid HTML but no luck. I will look into htmlparser2 tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants