Git Product home page Git Product logo

Comments (10)

vzaidman avatar vzaidman commented on May 12, 2024 1

@parties I dont have it here where I updated react-redux and redux:
https://codesandbox.io/s/whydidyourender-false-positive-demo-pjkn7

These older versions didn't handle state changes as well as the last version.
I strongly suggest using the last one.

from why-did-you-render.

vzaidman avatar vzaidman commented on May 12, 2024

it probably has to do with react-navigation indeed because i don't see any reason why it's state changes. you does't even use it.

just to make it clear, your component doesn't look like it re-renders with the same props, the state it warns about is the this.state of SyncView, not the redux state.

I didn't work with react native for a long time so i'm not sure I can help you by myself.

but lets try some things:

  1. what version of react do you use?
  2. what version of the library do you use?
  3. can you try the same by changing props through a father and not redux?

also in your example you wrap MyComp. is it a typo? do you need to edit it to be SyncView?

from why-did-you-render.

vzaidman avatar vzaidman commented on May 12, 2024

@Aequitas737

from why-did-you-render.

Aequitas737 avatar Aequitas737 commented on May 12, 2024

@vzaidman

  1. "react": "16.5.2",
  2. "@welldone-software/why-did-you-render": "^2.5.2"
  3. I couldn't try as it's no longer set up in the same way, but It's worked before.
    Yeah it was a typo

from why-did-you-render.

vzaidman avatar vzaidman commented on May 12, 2024

ok. so you can't reproduce it anymore?

from why-did-you-render.

Aequitas737 avatar Aequitas737 commented on May 12, 2024

As in I don't have why-did-you-render set up anymore. I only added it temporarily to test several tools to help improve performance of the app.

from why-did-you-render.

vzaidman avatar vzaidman commented on May 12, 2024

ok thanks. if you wish to try again with me you are welcome to reopen the issue.

from why-did-you-render.

parties avatar parties commented on May 12, 2024

@vzaidman

I am seeing this issue myself when using connect in a simple Todo app.

(I think) I have made a working demo replicating this bug; it appears to be showing a false positive about a different state object for a component that doesn't use state at all.

Demo here: https://codesandbox.io/s/1j4qc

from why-did-you-render.

parties avatar parties commented on May 12, 2024

Ah ha, interesting.

I had those packages set to the older versions since those are the current versions of the application I'm currently working on (large app, not a trivial upgrade).

Thank you for taking a look, @vzaidman.

from why-did-you-render.

dihan avatar dihan commented on May 12, 2024

Updating Redux fixed this issue for me

from why-did-you-render.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.