question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: sandpack-react: Duplicate entry points

See original GitHub issue

FIrst of all - thank you for nice tool! I’m really happy to use it in my projects 🙌

Bug report

  1. This setup gives 2 tabs with same title App.tsx, and renders default template in preview, instead of my App.tsx
<Sandpack
  template="react-ts"
  files={{
    "/App.tsx": code
  }}
/>
  1. This setup gives no tabs, but nothing renders in preview
<Sandpack
  template="react-ts"
  files={{
    "/App.tsx": code
  }}
  customSetup={{ entry: "/App.tsx", main: "/App.tsx" }}
/>

Expected:

  • no tabs
  • preview renders my provided example

You can try it in sandbox https://codesandbox.io/s/sandpack-codesandbox-rendering-conflict-forked-hfuip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
uyarncommented, Dec 14, 2021

@danilowoz, the template of react and react-ts is different, which is confusing sometimes. I think it’s better to unify the format of these 2 react templates.

0reactions
danilowozcommented, Dec 20, 2021

It has been addressed on https://github.com/codesandbox/sandpack/pull/268, please let me know if I covered all topics/problems mentioned here.

Thanks for raising up this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build an interactive blog with React and Sandpack
With Sandpack's interactive code samples, you can take your blog to the next level. Learn how to implement them in this detailed post....
Read more >
ESM dependencies are not resolved correctly during build
06:04:41 AM [build] Building static entrypoints. ... I ran into this problem with the @codesandbox/sandpack-react package.
Read more >
Getting problem with duplicate items in the cart in React.js
First, if you want the user to be able to select up to 4 products, you should change handleAddToCart 's if statement, change...
Read more >
Ammunition and Explosives Safety Standards
Storage at the ammunition supply points and ammunition transfer points ... (b) A single entrance with double doors, both doors must be ajar....
Read more >
@codesandbox/sandpack-client - npm
sandpack -client. A bundler that completely works in the browser and takes advantage of it. Why? Online code playgrounds are getting more ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found