title: React warning MUI: A component is changing the default checked state of an uncontrolled SwitchBase after being initialized
body: <p>I'm trying to render a mui Switch component with default checked value. But it isn't working and i'm getting the warning.</p>
  <pre><code>MUI: A component is changing the default checked state of an uncontrolled SwitchBase after being initialized. To suppress this warning opt to use a controlled SwitchBase. 3 useControlled.js:27
  </code></pre>
  <p>I have also tried setting <code>checked</code> property along with <code>onChange</code> but still it doesn't work! I can't figure out what i'm doing wrong here.</p>
  <pre><code>{details.schedule.days.map((d) =&gt; (
                  &lt;StyledTableRow&gt;
                    &lt;TableCell&gt;
                      &lt;Typography variant=&quot;subtitle1&quot; fontWeight=&quot;bold&quot;&gt;
                        {d.day}
                      &lt;/Typography&gt;
                    &lt;/TableCell&gt;
                    &lt;TableCell&gt;
                      &lt;FormControlLabel
                        control={
                          &lt;Switch
                            onChange={(e, checked) =&gt; {
                              setDetails((p) =&gt; {
                                let prev = { ...p };
                                prev.schedule?.days?.find(
                                  (el) =&gt;
                                    el.day === d.day &amp;&amp;
                                    (d.open = e.target.checked)
                                );
                                return prev;
                              });
                            }}
  
                            defaultChecked={d.open}
                          /&gt;
                        }
                        labelPlacement=&quot;bottom&quot;
                        label={d?.open ? `Open` : `Closed`}
                      /&gt;
                    &lt;/TableCell&gt;
                  &lt;/StyledTableRow&gt;
                ))}
  </code></pre>