Questions tagged [codesandbox]

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.

276 questions
0
votes
0 answers

Jest tests not seeing the test files in "Vanilla Static" template

I haven't successfully used jest tests in codesandbox before, but I heard it was zero config. I am trying now in this "Vanilla Static" template: https://codesandbox.io/s/lr74k637mq I created a PathStore.test.js - however the test console is never…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
0
votes
0 answers

How to convert a CodeSandbox proyecto into a React Production App?

I'm having a little problem with React App, see. My computer is a bullshit and I program in CodeSandbox. a week ago I have finished my React App that I was made in CodeSandbox and for upload it in my host I've downloaded the proyect to my pc and I…
Diego Cardona
  • 355
  • 1
  • 3
  • 12
0
votes
1 answer

Configuring rollup for a react library

I am sorry, I didn't where else to post this. This is my rollup configuration import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import babel from 'rollup-plugin-babel'; import { terser } from…
Adeel Imran
  • 13,166
  • 8
  • 62
  • 77
0
votes
1 answer

react-photo-gallery don't change photos via state

The photo object is not changing in the Gallery component via state. I created a "folder gallery", a multi gallery component to render a new one if you select it by click. See the demonstration: https://codesandbox.io/s/50wr02n8q4 github…
Francis Rodrigues
  • 1,470
  • 4
  • 25
  • 61
0
votes
1 answer

react-testing-library and codesandbox problem when writing tests for component and parent

I'm making a simple battleship game. First, I created the tests for the Board. Now I'm writing the BoardContainer, which holds the state and counts the turns and hits, and renders such Board. In the Board tests, I check the size of it (10x10), but…
diegoalmesp
  • 162
  • 1
  • 13
0
votes
1 answer

Cannot get web component to work in codesandbox.io

I'm trying to get a customized built-in web component to work in codesandbox.io. This is the code: class MyDiv extends HTMLDivElement { constructor() { super(); } connectedCallback() { this.innerHTML = "works!"; …
connexo
  • 53,704
  • 14
  • 91
  • 128
0
votes
0 answers

JS fiddle React js external resource issue

Here is my sandbox React Example I want to implement same thing in js fiddle. i have tried jsfiddle external resource to import dependency .but its not working. I need a fiddle with the dependencies that are mentioned in package.json of code sand…
I.ali
  • 201
  • 1
  • 3
  • 12
0
votes
1 answer

CodeSandbox with Material-UI error: undefined is not an object (evaluating '_context$muiTheme.borderRadius')

I am trying to test Material-UI components on CodeSandbox. And keep getting the error: TypeError undefined is not an object (evaluating '_context$muiTheme.borderRadius') What am I doing wrong?
Eduard
  • 8,437
  • 10
  • 42
  • 64
-1
votes
0 answers

"The file is not displayed in the editor because it is either binary or uses an unsupported text encoding" CodeSandbox

I tried uploading a video file to CodeSandbox(It was an MP4 Windows Media Player) and I got the error, "The file is not displayed in the editor because it is either binary or uses an unsupported text encoding". I clicked and dragged the file…
-1
votes
1 answer

Why I receive Cannot Get/, while I set on default port 3000

After starting the server with node server.js I'm getting an error stating Cannot GET when I access localhost:3000 and I just wondered if anyone knew how to fix it? Please tell me where I'm doing wrong? Ps. I'm using CodeSandbox Thank you. Cannot…
-1
votes
1 answer

Javascript code runs fine on Codesandbox but not on localy or on a webserver

I tried to read read QR code thanks to javascript code found in this tutorial The code provided by this tutorial works inside the codesandbox linked in the tutorial, however it doesn't work when I tired the same exact code on my laptop or on my…
-1
votes
1 answer

What is the reason of Parsing error:Unexpected token, in codesandbox project

I have Parsing erros: Unexpected token, expected "," in the project I code in codesandbox.io. I have just connected codesandbox project into github repository and it throws such error which I cannot figure-out. Can You please suggest what is wrong…
marcinb1986
  • 708
  • 1
  • 11
  • 30
-1
votes
1 answer

I am trying to make a platformer, but, I don't know how to ad key controls

I am trying to make a platformer, but, I don't know how to ad key controls. How Do I do this? Javascript is not for making games I know, but my IDE cant run c, c++, c#, python, and more. it can only run javascript, typescript, and vue.
Coder
  • 1
  • 1
-1
votes
1 answer

focus() not really working in a React codesandbox on Chrome and Firefox

I have a totally simple React sandbox https://codesandbox.io/s/musing-glitter-wgj13s?file=/src/App.js:335-349 It's supposed for the button First to focus after clicking the Second one and vice versa. Unfortunately the blue border is not showing…
-1
votes
1 answer

Code Sandbox style is different than Chrome style

I tested a React app design using css and bootstrap in Code Sandbox (online editor). The problem is, when I copied the files to a real react app in my computer, the page styling is different than what I designed in code Sandbox. Is there anything…
Miss. Tea
  • 61
  • 1
  • 5
1 2 3
18
19