gaearon / gaearon/react-hot-loader

Not reload with React.memo and defaultProps

Open
#1,321 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
775
PR merge metrics
No merged PRs in 30d

Description

When we use React.memo(compoennt)
and we set component.defaultProps = {}
Hot reloading docent work if we remove component.defaultProps = {}, works

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported setup with React.memo and component.defaultProps = {} in a minimal hot-reload case. Read the React hot-reloading path that handles memoized components and default props, then compare behavior with and without the defaultProps assignment. Done means hot reloading works for the memoized component when defaultProps is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.