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.

JSS array syntax stopped working

See original GitHub issue

Since JSS comes bundled in material-ui I am guessing that the problem is with your fork.

When I do

const styles = theme => ({
  main: {
    margin: [100, 50]
  }
})

I get margin: 100px, 50px; Notice the comma between the values.

If id do just

const styles = theme => ({
  main: {
    margin: 100
  }
})

it works fine

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
ilyadorcommented, Dec 6, 2017

Is there a material-ui specific way to enable this plugin?

2reactions
giapellecommented, Nov 29, 2017

Same problem here with version 1.0.0-beta.22 jss-expand seem completely broken (or not loaded?) With beta.21 all was ok.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSS array syntax stopped working · Issue #9335 · mui/material-ui
Since JSS comes bundled in material-ui I am guessing that the problem is with your fork. When I do const styles = theme...
Read more >
javascript array is not working in console - Stack Overflow
You are showing us the variable declaration, but the problem you get is when you use them and this part of code is...
Read more >
Array() constructor - JavaScript - MDN Web Docs
Note that this special case only applies to JavaScript arrays created with the Array constructor, not array literals created with the bracket syntax....
Read more >
Arrays - The Modern JavaScript Tutorial
But they all break if we quit working with an array as with an “ordered collection” and start working with it as if...
Read more >
JavaScript Arrays - W3Schools
Using an array literal is the easiest way to create a JavaScript Array. Syntax: const array_name = [item1, item2, ...];.
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