Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@lei9444
Copy link
Contributor

@lei9444 lei9444 commented Feb 2, 2021

Description

1. multi re-render

When we switch the tree item from project tree, we will update the recoil state and the reach/router will also update its context. These two will trigger twice re-render.

image
image
fix
All design page components only consume the designPageLocation state(recoil state). Add React.memo to check props change, and memorize the result.

image
image

2. remove CloneDeep

The clonedeep in visual editor will take about 80ms when switch the dialog. implement it in other way, and the time reduce to 0.3ms
image

3. The links in sideBar will call setState 9 times

The < Link /> don't have a root provider, so all < Link /> will call setState.
image

fix
Add a root provider for these < Link />, they will use the same context
image

Task Item

closes #5559 #4214 #3022

Screenshots

@coveralls
Copy link

coveralls commented Feb 2, 2021

Coverage Status

Coverage decreased (-0.02%) to 55.094% when pulling d591ad8 on lei9444:stateupdate into 383cc31 on microsoft:main.

@boydc2014 boydc2014 merged commit 806adcb into microsoft:main Feb 5, 2021
@boydc2014 boydc2014 mentioned this pull request Feb 7, 2021
lei9444 added a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…p 2) (microsoft#5673)

* use designPage only

* add router for link

* remove unused code

* add empty check

Co-authored-by: Srinaath Ravichandran <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Break down DesignPage

4 participants