question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IME] Should not be re-rendered when use input method

See original GitHub issue

The case:

slate-re-render

When the editor has video, iframe, or some complex component like MathJax, it will very clear to see the html DOM re-render.

I found onCompositionEnd event has some problems with use setTimeout to listen another composition event, and increment the forces key, and I will try to fixed it.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ms88privatcommented, Nov 7, 2017

@sethmcleod I can’t find it in the new documentation anymore.

You have to identify your exact problem first. Does your iframe component re-render every time or does it get instantiated over and over?

In the first case, try to prevent the re-render with shouldComponentUpdate. The second case shouldn’t happen normally, but it can happen if you serialise and deserialise meanwhile. By default it will loose the keys in the state and then the component will get destroyed and instantiated again. This can be avoided if you pass a specifc option to the (de)serialise process to preserve the keys.

0reactions
ChongShaocommented, Feb 22, 2018

@ianstormtaylor This led to a very serious performance problems, the editor there is a lot of text, each time I enter Chinese, the editor will be re-rendering, very stuttering, can you provide a solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent re-rendering of components that have not ...
I would like to prevent the re-rendering and only re-render the component that actually changes. I have seen that useCallback is the right...
Read more >
5 Ways to Avoid React Component Re-Renderings
In this article, I have discussed 5 different methods to prevent unnecessary re-rendering in React components. Most of these solutions capitalize caching, and ......
Read more >
React re-renders guide: everything, all at once - Developer way
Comprehensive guide on React re-renders. The guide explains what are re-renders, what is necessary and unnecessary re-render, what can ...
Read more >
When does React re-render components? - Felix Gerschau
Directly mutating the props object is not allowed since this won't trigger any changes, and React doesn't notice the changes. this.props.user.
Read more >
How to stop re-rendering lists in React? - Alex Sidorenko
Every time you update the property of one of the components in the ... React does not care whether “props changed” - it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found