Material UI Slider Consistently Crashes With Default Settings

Has anyone run into this or am I the only one? Using the Material UI slider control consistently crashes the browser page.

“Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn’t have a dependency array, or one of the dependencies changes on every render.”

I’ve seen this in the jsonforms-react-seed as well as the NextJS app described here (and they are both set up similarly where useState is used to display the bound input data, but useEffect hook in not.)

  • NextJS
  • Chrome
  • @jsonforms/core 3.0.0-alpha.3
  • Material renderer
57[Violation] 'message' handler took <N>ms
5[Violation] 'mousemove' handler took <N>ms
[Violation] 'pointerup' handler took 216ms
[Violation] 'pointerup' handler took 200ms
6[Violation] 'mouseup' handler took <N>ms
[Violation] 'click' handler took 213ms
[Violation] 'click' handler took 196ms
next-dev.js?3515:32 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.
    at exports.JsonFormsStateProvider (webpack-internal:///./node_modules/@jsonforms/react/lib/JsonFormsContext.js:61:23)
    at exports.JsonForms (webpack-internal:///./node_modules/@jsonforms/react/lib/JsonForms.js:152:21)
...
    "my_sider": {
      "type": "number",
      "description": "Lorem ipsum",
      "minimum": 10,
      "maximum": 100,
      "default": 50
    },
{
      "type": "Control",
      "scope": "#/properties/my_slider",
      "options": {
        "slider": true
      }
 }
    "@jsonforms/core": "^2.5.2",
    "@jsonforms/material-renderers": "^2.5.2",
    "@jsonforms/react": "^2.5.2",
    "@mui/icons-material": "^5.4.1",
    "@mui/material": "^5.4.1",
    "create-next-app": "^12.0.2",
    "next": "latest",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "tslib": "^2.3.1"

Thanks.

Hi @hellosilver,

Yes there was some bug between Material UI v4 and the integration in JSON Forms which at some point lead to this problem. It was originally reported in #1819. Since then we switched to Material UI v5 by which this issue was fixed too. So I recommend updating to the latest version of JSON Forms (3.0.0-beta.1) and also updating Material UI to v5 too.