4 ms·
Took a look, seems to me like the title is a bit misleading. Maybe I'm mistaken but from watching the video I don't get the sense that this copies 'React code'
by darepublic 4y ago
Took a look, seems to me like the title is a bit misleading. Maybe I'm mistaken but from watching the video I don't get the sense that this copies 'React code', from any site, it just takes a section of the dom from any site and copies over the relevant css and js.
I think something like this is going to take off though, as frontend devs we keep reinventing the wheel needlessly. You should be able to point to a site, any site, and basically clone it. Generate a suitable backend while you're at it. Do a style transfer. So say I want to have an ecommerce shop in a certain niche, point to an existing online store, do a style transfer, and boom you have the same functionality just with original content and style.
Addendum:
Figured I should give it a try because I think the idea has promise. But I tried this on three sites, a regular js site, a next.js site and a CRA site. Each time tried to do a 'Copy React' op on a button, and each time I just got back html.
- tscepo 4y agoThe react export option exports inline jsx for now. You should be able to directly paste that into a react file, as opposed to the html export. I purposely don't wrap the jsx in a named component since I can see all kinds of use cases where a person wants to inject jsx into a part of an existing component.
- darepublic 4y agoYou are right, it is not plain html, it is jsx.
- deleted 4y ago[deleted]