Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove updating elements only in development environment #109

Closed
wants to merge 1 commit into from

Conversation

MagnusPoppe
Copy link

Removes unwanted bugs that only occur in production environments for anyone who hasn't read through the source code.

Removes unwanted bugs that only occur in production environments for anyone who hasn't read through the source code.
@smalluban
Copy link
Contributor

smalluban commented Apr 23, 2020

Hi @MagnusPoppe!

Thank you for the time you took to prepare this PR. However, this part of the code is required for the Hot Module Replacement feature, which is very useful. It works in development mode, which can be turned on only by the bundlers (browser environment does not provide process.env.NODE_ENV, and library fallbacks then to "production" value).

Can you provide a use case, where it might be confusing, and leads to bugs in the production environment? If it is a probable situation it might be worth mentioning how that feature works in the docs, so other people would not be confused.

I have no intention to remove that feature. By the way, you forgot to remove the update() function in the source code (so, there is unused leftover 😄).

@smalluban
Copy link
Contributor

@MagnusPoppe I'm closing PR now due to no recent activity here. Use my comment above if you want to proceed with any changes. The best way is to start with an issue if you found obstacles with the HMR implementation.

@smalluban smalluban closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants