© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Serdar Sanri
Sr. Frontend Developer
I think you are totally confused about getDerivedStateFromProps. Its main point is not to set state, but return an immutable new state derived from props. Take a look at the link @go_diego posted.