Reputation: 551
I have been wondering if a component gets rendered again if the a prop is updated and its not being used in render method.
I am using Redux and some unnecessary props have been added to the component with mapStateToProps
of connect method. I know I should remove the prop if they are not used, but before I wanted to be sure if it makes any difference.
Upvotes: 1
Views: 192
Reputation: 587
Yes, on default it will/should rerender.
Take a look at this post: https://stackoverflow.com/a/38678454/9254064
EDIT: https://stackoverflow.com/a/48609609/9254064
Upvotes: 2