Skip to content
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

feat: DevJar react component export #32

Merged
merged 5 commits into from
Feb 18, 2023
Merged

feat: DevJar react component export #32

merged 5 commits into from
Feb 18, 2023

Conversation

huozhi
Copy link
Owner

@huozhi huozhi commented Feb 18, 2023

Introduce DevJar react component, to create the playground easier without customization

import { DevJar } from 'devjar'
const CDN_HOST = 'https://esm.sh'

function App() {
  const files = {
    'index.js': `export default function App() { return 'hello world' }`
  }
  return (
    <DevJar
      files={files}
      getModuleUrl={(m) => {
        return `${CDN_HOST}/${m}`
      }}
    />
  )
}

@vercel
Copy link

vercel bot commented Feb 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
devjar ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 18, 2023 at 11:24PM (UTC)

@huozhi huozhi merged commit ce92167 into main Feb 18, 2023
@huozhi huozhi deleted the react-component branch February 18, 2023 23:24
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

Successfully merging this pull request may close these issues.

1 participant