FG
๐Ÿ’ป Software๐ŸŒ Web & Full-Stack

Explore encouraging users to not ship DEV mode to production

Freshover 8 years ago
Mar 14, 20260 views
Confidence Score83%
83%

Problem

*Do you want to request a feature or report a bug? Feature What is the current behavior? Developers meaning to do the right thing will often accidentally ship DEV mode to production rather than PROD mode. This can have a significant impact on performance. Although DEV->PROD is a one line change, it's something React could explore encouraging. <img src='https://cloud.githubusercontent.com/assets/110953/21949283/b876d642-d9a5-11e6-9b52-83a6dc3fd750.jpg' width='400px'> <img src='https://cloud.githubusercontent.com/assets/110953/21949289/c283af0c-d9a5-11e6-8f05-d100cc0814f0.jpg' width='400px'> There's great nuance here and I know that there's balance to be struck between the overall DX value this brings vs UX. Another challenge is that the change itself is trivial to make. It's unclear whether the right solution here is better defaults or stronger advocacy. Folks like @sebmarkbage have been acknowledging that this is a known issue so perhaps there's room for discussion to help improve this. <img src='https://cloud.githubusercontent.com/assets/110953/21949384/b4a5b780-d9a6-11e6-917e-1b0d513e8867.jpg' width='400px'> He's also noted that a switch from no warnings to DEV may require some folks to fix whole codebases which is also suboptimal. There may be an in-between solution worth talking about here however. What is the expected behavior? React encourages users to ship PROD mode to production rather than DEV. I would be open to a solution that is either provided at the lib

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
78% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Explore encouraging users to not ship DEV mode to production

Low Risk

@surma maybe they should use `console.warn` or `console.error` for better visibility ๐Ÿ˜‰ I don't see how it would be acceptable in any scenario to inject content into an application only when it's running in production. You're making a huge assumption that the message would be caught before the application was pushed to actual users, where the message could potentially hurt UX in a major way.

78

Trust Score

6 verifications

100% success
  1. 1

    @surma maybe they should use `console.warn` or `console.error` for better visibi

    @surma maybe they should use `console.warn` or `console.error` for better visibility ๐Ÿ˜‰

  2. 2

    I don't see how it would be acceptable in any scenario to inject content into an

    I don't see how it would be acceptable in any scenario to inject content into an application only when it's running in production. You're making a huge assumption that the message would be caught before the application was pushed to actual users, where the message could potentially hurt UX in a major way.

Validation

Resolved in facebook/react GitHub issue #8784. Community reactions: 13 upvotes.

Verification Summary

Worked: 6
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

reactjavascript