Skip to content

Commit

Permalink
Fix ExpansionPanel Performance Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslaneconkling authored Nov 21, 2019
1 parent 320b6f9 commit d4477c5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ The content of ExpansionPanels is mounted by default even if the panel is not ex
This default behavior has server-side rendering and SEO in mind.
If you render expensive component trees inside your panels or simply render many
panels it might be a good idea to change this default behavior by enabling the
`unmountOnExit` in `TransitionProps`:
`mountOnEnter` in `TransitionProps`:

```jsx
<ExpansionPanel TransitionProps={{ unmountOnExit: true }} />
<ExpansionPanel TransitionProps={{ mountOnEnter: true }} />
```

As with any performance optimization this is not a silver bullet. Be sure to identify
Expand Down

0 comments on commit d4477c5

Please sign in to comment.