-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Type] QuestionQuestions about the design or development of the editor.Questions about the design or development of the editor.
Description
Description
I implemented API 3 to blocks and see big degradation of performance. After some research, I found that useBlockProps rerender block multiple times. Also it rerenders blocks when it's in View.
Step-by-step reproduction instructions
- Add console.log in edit function
- Add useBlockProps and check console. I see 4 times execution, also when I scroll down/up, I see execution when block is in view
- Now, remove useBlockProps. Console executed 1 time only
Screenshots, screen recording, code snippet
Monosnap.screencast.2023-11-30.06-07-33.mp4
Environment info
6.4 Wordpress
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Type] QuestionQuestions about the design or development of the editor.Questions about the design or development of the editor.