Merge pull request #4188 from overleaf/ae-memo

Improve React performance by memoizing components and values

GitOrigin-RevId: 805278b8b7ac04c3dc4b078fa53cc0e3770d261b
This commit is contained in:
Alf Eaton
2021-06-22 02:07:08 +00:00
committed by Copybot
parent d64172cfff
commit eebeffc1c5
11 changed files with 216 additions and 157 deletions
@@ -5,7 +5,7 @@ import PreviewLogsPane from './preview-logs-pane'
import PreviewFirstErrorPopUp from './preview-first-error-pop-up'
import { useTranslation } from 'react-i18next'
function PreviewPane({
const PreviewPane = React.memo(function PreviewPane({
compilerState,
onClearCache,
onRecompile,
@@ -139,7 +139,7 @@ function PreviewPane({
) : null}
</>
)
}
})
PreviewPane.propTypes = {
compilerState: PropTypes.shape({