Replies: 1 comment 3 replies
-
I was thinking that using any existing sandbox as a template would be very useful. const code = `export default function App() {
return <h1>Hello World</h1>
}
`;
<Sandpack
template="https://codesandbox.io/s/csb-id-bx70k"
files={{
"/App.js": code,
}}
/>; Does it make sense? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now the sandpack packages have 3 templates hardcoded:
Let's talk here about how to approach templates. There are two options.
Option 1: Short-term
We continue adding to the templates folder in the sandpack-react package. There's an open issue with a bunch of templates that could be useful. However, this is not really maintainable, nor scalable
Option 2: Long-term
Fetch templates from codesandbox to ensure we're always loading the latest when it comes to cra, vue-cli, etc.
Beta Was this translation helpful? Give feedback.
All reactions