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
React DOM not updating on state change
I have a react component that will accept an arbitrary number of files, each with its own language. I want to be able to have a button that lets a user add as many files as they want, each with its own dropdown menu of languages. I've eliminated the…

7evam
- 145
- 3
- 14
0
votes
1 answer
How to retrieve value passed to a prop from an array VueJS/NuxtJs
CodeSandbox
Reference Video
I'm trying to retrieve a value that was dynamically created and passed to a prop.
After clicking "add card" and clicking on one of the created cards, the goal is to pass the value(prop: randomNum) into a…

vaspam
- 3
- 4
0
votes
1 answer
Safari Only: Codesandbox unable to get data from localhost server
Server / API: https://github.com/LambdaSchool/trinkets-api
Mock website: https://codesandbox.io/s/pt14-httpajax-ii-0176m?file=/src/components/Item.js
In the code it uses axios to request data from the server running locally on my machine. It works…

DMConklin
- 13
- 5
0
votes
0 answers
How to fix issue where importing TailwindCSS by CDN works fine but installing it as a NPM dependency does not only on codesandbox.io?
I've built a small notes app using Vue.js with TailwindCSS. To publish it, I've put it on codesandbox.io but due to some unknown reasons, styles does not apply. If I use CDN to import TailwindCSS, it works fine. Other configurations are same as my…
0
votes
1 answer
Is it possible to build a react app from within codesandbox itself?
Is it possible to create a build of a react app created with the codesandbox template by running npm run build on codesandbox itself?
In short is it possible to run npm scripts on codesandbox
If yes, how?

Rahul Yadav
- 2,627
- 5
- 30
- 52
0
votes
1 answer
React - Redux State update but not rendered in the component
I have a component Details.js where i am populating teams from 4 Leagues in a Select Dropdown
Depending on the team selected the states in State.js component are updated
The problem is that depending from the team selected, sometimes the state is…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
0 answers
Codesandbox Invalid Hook
I have a problem on codesandbox, that is not reproducable in normal setup.
The error is: "Invalid hook call. Hooks can only be called inside of the body of a function component." - invariant 321
I only use function components
There actually was a…

Michael B.
- 899
- 10
- 16
0
votes
1 answer
React Action Requests and Redux Structure
I have successfully created an action doing a call request to the following endpoint
https://api-football-v1.p.rapidapi.com/v2/statistics/{league_id}/{team_id}
API Documentation is here
I have created a little demo in codesandbox where you can see…

Koala7
- 1,340
- 7
- 41
- 83
0
votes
1 answer
_rete.createEditor is not a function, where is the problem in my code?
I try to implement rete.js visual programming framework in my codesandbox and used the following code in my canvas.js file:
import "../../styles.css";
import { createEditor } from "../../rete";
function Canvas() {
return (

RainerWinkler
- 13
- 3
0
votes
3 answers
How to use MongoDB with codesandbox?
I have been following an Udemy course to learn mongodb, and since the tutor uses a cloud based ide (cloud9), I have also decided to use the same. However, since cloud9 now requires AWS account I thought of using CodeSandbox. But I can't figure out…

user12416557
- 13
- 5
0
votes
1 answer
Codesandbox - change language
Is there any way to change language in Typescript error popup messages in codesandbox?
Below error message is in PL
But when I hover HTML error, I am getting error in EN language:
Note that error ts(2531) is in PL

bsekula
- 914
- 1
- 9
- 25
0
votes
3 answers
Why is my react form not working on codesandbox
I created a simple form here https://codesandbox.io/s/xenodochial-frog-7squw
It says You provided a value prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue.
But…

user3808307
- 2,270
- 9
- 45
- 99
0
votes
1 answer
npm package makes codesandbox show blank screen
for the first time, I made a react library to handle infinite scroll for window and element.
the package works with no problem when I create a react app and install the package on it.
but in code sandbox when I add the package to the dependencies,…

reza erami
- 138
- 6
0
votes
0 answers
Accessing Airtable from Codesandbox.io
I literally copied the snippets from Airtable API, for example:
var Airtable = require('airtable');
var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('BASE_KEY');
base('Test').find('RECORD_ID', function(err, record) {
if (err) {…

Edgar Derby
- 2,543
- 4
- 29
- 48
0
votes
1 answer
dayjs - how to create an ISO datetime string in a different timezone?
I am building an browser-based application where the user sets the timezone of their application, e.g. "America/New_York". I have a part of the application that allows users to set reminders and I want the user to specify that they want, for…

JoeTidee
- 24,754
- 25
- 104
- 149