Codesandbox.io is an open-source online code editor supporting vanilla JS, Vue.js, Angular.js, React.js, and Preact.js. DO NOT use this tag just because your code is hosted on CodeSandbox, and your problem is otherwise unrelated to the CodeSandbox site.
Questions tagged [codesandbox]
276 questions
0
votes
2 answers
How to use BrowserRouter and Route in CodeSandbox React JS?
I'm trying to use BrowserRouter and Router in my ReactJS project at CodeSandbox and there is a dependency error: Could not find dependency: 'react-router-dom' relative to '/src/App.js'
I don't know how to control these dependencies yet. Please…

Lado Gelava
- 35
- 5
0
votes
0 answers
The content of the two sandbox in codesandbox.io is the same, but the output of the browser is different (Solved)
I have two forked sandbox in codesandbox.io. Although these two sandboxes forked from different places, but I have modified them to use the same package and content.
I wonder why the output results of these two codesandbox are different.
First…

Coleone
- 63
- 2
- 12
0
votes
0 answers
Codesandbox live preivew
I hope someone can help me with this.
I am writing my CSS for React APP in codesandbox but on CTRL + S, I am not able to see live changes, even if I've turned live preview ON.
Someone had same problems?
Cheers!

Haris Hamzić
- 23
- 5
0
votes
1 answer
Material ui can not text-overflow: ellipsis and overflow: hidden more than one line
i am newbie for material ui, this is my current website state:
reality of current website
and this what i expected:
what i expected it become
as you can see from the those 2 pictures above, i want the text in the circle was shorten and truncate by 3…

Tam Do
- 181
- 4
- 15
0
votes
1 answer
How to add texts at the bottom of Material-UI GridList Image, in Reactjs
I am working on a Mern-stack and I am using Material-UI on my frontend. My GridList is working fine, but I want to have my description text at the bottom of the image instead of in-front of the image.
When I add the text at the bottom it does not…

Chukwuma Kingsley
- 497
- 8
- 20
0
votes
1 answer
Why does Svelte app on Codesandbox.io result in TypeError ... is not a constructor?
Trying to understand how writable and readable stores work in Svelte. So tried to reproduce a minimal version of the alert component described in…

Graham Hopper
- 97
- 1
- 5
0
votes
1 answer
React Context in CodeSandbox
I'm having issues with React Context using CodeSandbox.
My basic example:
App.js
import React, { useEffect, useContext } from "react";
import { FirmsContext } from "./FirmsContext";
export default function App() {
const { firms, fetchFirms } =…

Jim Dover
- 593
- 2
- 12
- 30
0
votes
2 answers
https://codesandbox.io how to implement dependencies on local version
I stumbled across a project I thought was interesting.
https://codesandbox.io/s/bar-chart-race-eop0s?file=/src/index.js
I downloaded the files.
I need the dependencies to be included as I see from the json package file:
{
"name":…

John
- 346
- 1
- 9
- 19
0
votes
1 answer
Browser auto refresh when i'm using setState (Hook)
could anyone show me the reason that the page auto refresh when i'm using setTodoItems in this link. I can't display the item which i were added before on my Todo table.
Here is my example:…

TurTols
- 19
- 5
0
votes
1 answer
Component duplicating when using keys
I am attempting to make a component carousel in React using Framer Motion. The children of AnimatePresence need a key, so I decided to pass a page state as the key. However, doing this makes the component I am trying to render duplicate. I thought…

Jordan Baron
- 141
- 1
- 12
0
votes
1 answer
Javascript Fetch - How to Fix Failed to Fetch Error (probably from making HTTP request on HTTPS site?)
This is the React app (and code). It generates 3 random objects (from list of 500+ objects stored locally). I want to call IconFinder API when the random objects are chosen and just display the icons then (instead of finding 500 icons…

Madhav Malhotra
- 385
- 1
- 5
- 17
0
votes
1 answer
How to export and Sync a React Sandbox from CodeSandbox to Github repository?
I have created a React project in CodeSandbox but I am not able to export, even after several tries. Getting the below error again and again.
Here is the error

Priyadarshini Chettiar
- 3
- 1
- 2
0
votes
2 answers
Configuring Jsx-control-statement codesandbox.io
I am practicing react on condesanbox.io installed jsx- control-statement dependency. When iam adding any of the control statement it is undefined.
How to configure jsx- control-statements in codesandbox.io.

amt14779
- 125
- 1
- 1
- 5
0
votes
1 answer
Codesandbox and importing Github repos built with Vue-CLI: TypeError Cannot read property 'toString' of undefined
I have an app built using Vue-Cli and it works fine locally, however, when I import the code from Github into Codesandbox, I get the following error:
And I get squigly red line/error here:
Anyone know what I need to do to fix?
You can access the…

redshift
- 4,815
- 13
- 75
- 138
0
votes
1 answer
CodeSandbox: Display codeline in console
How can you display the line of codes in the console in Codesandbox?
I was searching in the settings but couldn't find anything.

coasterrel
- 103
- 1
- 2
- 9