You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Add Development Build Scripts #1316
Yes, the input component created with React.cloneElement won't update it's state in production environment, no errors or warning. Will look further to it and add code sample.
But what do you think about this feature? I think it's some kind of escape hatch
I’m thinking we should randomize build names in every release now that people are relying on it. And beginners reading your article will rely on it because they don’t understand the dangers as well as you do. And we’re back to JavaScript fatigue where every update is dangerous. 😞
I think that maybe less experienced developers might actually think it's a supported way of modifying CRA's config from some articles (yours is not the first one I've seen). So maybe we could make it seem "scarier" to import it by making the path a little more obscure, like react-scripts/config/webpack.config.dev-0.8.4.js. So that it's obvious it could break in the next version and is not supported.
Yes, I think that's a good way to prevent something like this happening. I've updated the article with a disclaimer. But I still think that we need a build with env set to development. It's obviously an edge case. Like the issue i've experienced, it's too much consuming to find the bug in react on production
Activity
gaearon commentedon Dec 23, 2016
Can you give more details on how React works differently? This sounds like bug in React.
viankakrisna commentedon Dec 23, 2016
Yes, the input component created with React.cloneElement won't update it's state in production environment, no errors or warning. Will look further to it and add code sample.
But what do you think about this feature? I think it's some kind of escape hatch
viankakrisna commentedon Jan 12, 2017
Haven't got time to add code example, but for people who wants the escape hatch, I wrote an article about it in here:
https://medium.com/@viankakrisna/extending-create-react-app-webpack-config-c70828593c96#.3gu6c1lpz
gaearon commentedon Jan 12, 2017
This can break with every patch version:
I’m thinking we should randomize build names in every release now that people are relying on it. And beginners reading your article will rely on it because they don’t understand the dangers as well as you do. And we’re back to JavaScript fatigue where every update is dangerous. 😞
viankakrisna commentedon Jan 12, 2017
Yes, like i said, it's an escape hatch, it will work until it won't work anymore T_T.
What do you mean about randomize build names?
gaearon commentedon Jan 12, 2017
I think that maybe less experienced developers might actually think it's a supported way of modifying CRA's config from some articles (yours is not the first one I've seen). So maybe we could make it seem "scarier" to import it by making the path a little more obscure, like
react-scripts/config/webpack.config.dev-0.8.4.js. So that it's obvious it could break in the next version and is not supported.viankakrisna commentedon Jan 12, 2017
Yes, I think that's a good way to prevent something like this happening. I've updated the article with a disclaimer. But I still think that we need a build with env set to development. It's obviously an edge case. Like the issue i've experienced, it's too much consuming to find the bug in react on production
gaearon commentedon Feb 11, 2017
I’m closing since this appears to be a duplicate of #1070.
Let’s continue the discussion there.
This sounds like a bug in React, and you should file one there.