Skip to content

[HMR] Avoid clearing out factory on DEV mode#7568

Closed
martinbigio wants to merge 1 commit into
react:masterfrom
martinbigio:fix-hmr2
Closed

[HMR] Avoid clearing out factory on DEV mode#7568
martinbigio wants to merge 1 commit into
react:masterfrom
martinbigio:fix-hmr2

Conversation

@martinbigio

Copy link
Copy Markdown
Contributor

@grabbou pointed out this issue.

We recently started cleaning out the factory function after module are required to save some memory. This broke HMR on some edge cases because sometimes the factory function may need to be re-executed. This PR just wraps the optimization into __DEV__ to make sure we don't use it while developing.

@martinbigio

Copy link
Copy Markdown
Contributor Author

cc @grabbou @tadeuzagallo @satya164

@ghost

ghost commented May 14, 2016

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @davidaurelio and @janicduplessis to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 14, 2016
@tadeuzagallo

Copy link
Copy Markdown
Contributor

LGTM

@martinbigio

Copy link
Copy Markdown
Contributor Author

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 16, 2016
@ghost

ghost commented May 16, 2016

Copy link
Copy Markdown

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 6457eff May 16, 2016
grabbou pushed a commit that referenced this pull request May 21, 2016
Summary:
grabbou pointed out this issue.

We recently started cleaning out the factory function after module are required to save some memory. This broke HMR on some edge cases because sometimes the factory function may need to be re-executed. This PR just wraps the optimization into `__DEV__` to make sure we don't use it while developing.
Closes #7568

Differential Revision: D3305120

Pulled By: martinbigio

fbshipit-source-id: 741cffbb327d118f0bd0ec34dc1af53d4f94880e
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
Summary:
grabbou pointed out this issue.

We recently started cleaning out the factory function after module are required to save some memory. This broke HMR on some edge cases because sometimes the factory function may need to be re-executed. This PR just wraps the optimization into `__DEV__` to make sure we don't use it while developing.
Closes react#7568

Differential Revision: D3305120

Pulled By: martinbigio

fbshipit-source-id: 741cffbb327d118f0bd0ec34dc1af53d4f94880e
cpojer pushed a commit to react/metro that referenced this pull request Jan 26, 2017
Summary:
grabbou pointed out this issue.

We recently started cleaning out the factory function after module are required to save some memory. This broke HMR on some edge cases because sometimes the factory function may need to be re-executed. This PR just wraps the optimization into `__DEV__` to make sure we don't use it while developing.
Closes react/react-native#7568

Differential Revision: D3305120

Pulled By: martinbigio

fbshipit-source-id: 741cffbb327d118f0bd0ec34dc1af53d4f94880e
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants