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.

Themr breaks shouldComponentUpdate shallow equal optimization

See original GitHub issue

Themr breaks shouldComponentUpdate shallow equal optimization. Every new render themr returns a new object reference for theme object, so all subsequent optimizations based on shallowEqual like pure recompose enhancer always returns true. As nextProps.theme !== props.theme.

I’ll create a PR to fix.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
javivelascocommented, Oct 1, 2016

Thank you @istarkov and @raveclassic, beautiful conversation 😄 I’m merging 👍 there are no breaking changes and I agree that updating context should not be solved in here. I’m also releasing a patch

1reaction
raveclassiccommented, Sep 26, 2016

@istarkov Ahh makes sense now, sorry, didn’t notice. At last we need to wait @javivelasco to take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing React.js Performance with PureComponents and ...
In the case of PureComponents, the shouldComponentUpdate method does a shallow comparison of that component's state and props to determine ...
Read more >
How to implement shouldComponentUpdate with this.context?
Basically, if I move a context-dependant component anywhere inside a PureRenderMixin -enabled component, it will break but very subtly.
Read more >
Shallow Compare - React
shallowCompare performs a shallow equality check on the current props and nextProps objects as well as the current state and nextState objects. It...
Read more >
Writing efficient React code - Firefox Source Docs - Mozilla
As a start let's discuss about how React renders normal plain components, that don't use shouldComponentUpdate . What we call plain components here...
Read more >
Large Dynamically Generated Forms in React — Part 2
Step 1 — Break into smaller components. Independent of our goal of optimizing our forms, it is good practice to separate components into...
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