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.

Rerendering issue starting with 0.8.1

See original GitHub issue

It seems that Jotai rerenders all connected components, even ones that are not subscribed to changing atoms.

https://codesandbox.io/s/jotai-demo-forked-4fzwi

This issue starts with 0.8.1. It’s okay with 0.8.0. If you type into the input and look at the console, you will see Static is rerendering.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dai-shicommented, Oct 28, 2020

To me it’s expected, but it would only be for ones who know the internal implementation. I start regretting to add CM support too early. Let me work on a possible fix with feature detection.

0reactions
paulshencommented, Oct 27, 2020

If you open the sandbox now and type in the input, you’ll see that Static is rendered with renderRef.current = 1 in console.log. However, this is not committed to the DOM (still renders 0).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't my Component re-rendering? — mthomure/reagent ...
There's two possible answers: a ratom (used by the Component) changed. the props for (arguments to) the Component changed.
Read more >
Component Re-rendering issue - Stack Overflow
When passing data to parent component child component gets re-render it looks like. Mean to say Dropdown selection is get reset and tree...
Read more >
How to stop re-rendering lists in React? - Alex Sidorenko
Components always re-render​​ First, let's simplify our example by removing all props from the Item . We will still update the parent state...
Read more >
How and when to force a React component to re-render
Since the beginning of the web, we've used HTML and CSS to define ... The component did not change, so there was no...
Read more >
How to check if your component rerendered - and why!
This can work fine at the beginning - but what if you want to answer ... tree and what changed - "grey" means...
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