Skip to content

Copy/paste as JSX #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Wolfr opened this issue Jun 29, 2021 · 2 comments
Closed

Copy/paste as JSX #388

Wolfr opened this issue Jun 29, 2021 · 2 comments

Comments

@Wolfr
Copy link
Contributor

Wolfr commented Jun 29, 2021

What if we have a transform on the HTML example where it transforms the HTML to JSX, to then be able to c/p as JSX? This would then make it easier to copy/paste to React projects.

export default function Example() {
  return (
    <div className="something">

    </div>
  )
}

Ref https://magic.reactjs.net/htmltojsx.htm

@Wolfr
Copy link
Contributor Author

Wolfr commented Jul 8, 2021

A version of this was implemented in https://github.com/usebedrock/bedrock/tree/feature/jsx-copy .

@Wolfr
Copy link
Contributor Author

Wolfr commented Jul 14, 2021

This is now in Bedrock canary branch, along with a fix for #387 .

@Wolfr Wolfr closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant