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
1 answer
Trying to place an image in a fixed positon. Why the image is misplaced until I do a page refresh?
Newbie here.
I just started playing around with ReactJS on codesandbox.
I want to keep an image element (the green arrow) in a specific position over the gauge element. I tried it the simplest way I could think of, and it kinda suits what I need,…

yesisiddis
- 3
- 1
0
votes
1 answer
CodeSanbox seperate downloading option?
I'm a freshman stuck with a school Chromebook that blocks extensions and apps, so CodeSandbox is my best option for a code editor.
I'm quite new to CodeSandbox, so I'm not completely sure how to download specific files. I have an HTML file in my…

COLIN SCHAFFNER
- 1
- 1
- 1
0
votes
1 answer
How to add a title to a sandbox created in codesandbox with the svelte template
I created a svelte project in codesandbox using the svelte client template. When I open the output of the sandbox in its own window, the title is "Sandbox - CodeSandbox".
The default template uses rollup, however it says at the top of the…

Jeffrey Vest
- 124
- 1
- 12
0
votes
1 answer
"React.createContext is not a function" in CodeSandbox when using `@emotion/core` and latest version of React
I am using @emotion/core. It works on my machine, but when I try to use it in codesandbox I get the error:
React.createContext is not a function
Other posts about this error are resolved by updating the version of react. But code sandbox is using…

maddie
- 1,854
- 4
- 30
- 66
0
votes
1 answer
React js tsx codesandbox problem A cross-origin error was thrown and lodash.isequal
I was trying the following code, of a module, but it gives me the following problems:
Problem:
A cross-origin error was thrown. React doesn't have access to the
actual error object in development. See
.../react-crossorigin-error for more…

Paul
- 3,644
- 9
- 47
- 113
0
votes
2 answers
codesandbox.io unable to point to anything expcet "index.html"
Trying to setup a vanilla JS on codesandbox.io, when I change the name of the index file, the app no longer can see the HTML at all and throws an error. I must be missing something here, why can I not change the name?
In the link here, I have a very…

Michael
- 4,538
- 5
- 31
- 58
0
votes
1 answer
How to use Babel Plugin Proposal Throw Expressions in Codesandbox?
Using React in Codesandbox i tried to throw new Error('Something went wrong'); and i had this error:
I already added this dependency: https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions and still won't work.
Here's my code

Twirlman
- 1,109
- 2
- 12
- 30
0
votes
0 answers
Invalid CSS after "Κ": expected "{", was "" in codesandbox
I created a vue application with vuetify in codesandbox
The problem is codesandbox doesn't load sass file. I have sass-loader in package.json.
Not sure what the problem is and the message is not clear.
Error: Invalid CSS after "Κ": expected "{", was…

Jon Sud
- 10,211
- 17
- 76
- 174
0
votes
1 answer
Fetch with React on codesandbox : cross-origin error
I have the following fetch call in a React app on codesandbox :
https://codesandbox.io/s/react-fetch-example-for-so-vxxie
If I activate either line
.then(console.log(data))
or
loadOptions={this.state.data}
I get :
A cross-origin error was thrown.…

Jérôme Oudoul
- 369
- 1
- 5
- 14
0
votes
3 answers
How to splice an array within the state of a React Component
I am making a timesheet app. The index.js renders the table. The rows of the table are read from the children array. The children array reads the state to keep itself updated. AddRow() is working fine. DeleteRow() has some problem. I intend to fetch…

Raju
- 25
- 4
0
votes
1 answer
How do I use window.location.href in codesandbox.io?
I'd like to use window.location.href in the tool codesandbox.io. This is because I want to do a test with a hard page load occurring. I'm running into an issue however.
location.href = "http://www.google.com"
I get this error:
Mixed Content: The…

Michael R
- 1,547
- 1
- 19
- 27
0
votes
1 answer
react-testing-library cleanup doesn't work in codesandbox
cleanup doesn't work in codesandbox and I comment the ReactDOM.render function as someone suggesting to in here: https://github.com/CompuIves/codesandbox-client/issues/1525 and it works, but fireEvent doesn't work. Vice versa, when I don't comment…

berlirmp
- 1
- 2
0
votes
1 answer
How to clone a dojo (TypeScript) project from codesandbox to my server?
I need to migrate/clone a project that is in https://codesandbox.io/s/8zro6m4kj9 is a list in Dojo (I do not know the version), but it is a file with extension .ts (TypeScript).
I tried to download the project and run it, then I tried to install…

Carlos
- 201
- 2
- 10
0
votes
1 answer
Updating Input Value with Input Passed Into Child Component with React Hooks
I have a loading component that creates a skeleton until the content renders via @trainline/react-skeletor. In this case I am creating a skeleton for a form.
First off, I have a CodeSandbox for those who want to see what is occurring, and all the…

mcclosa
- 943
- 7
- 29
- 59
0
votes
2 answers
Problem with circular references in Vue.js - but only in CodeSandbox
I have a Vue.js application (m4ops), and am developing a public Vue.js package (vfg-display-fields) to be part of it. As it is a tree structure, the package has a pair of components which are circular references. I have resolved this using the…

Peter Cooper
- 151
- 5