jiebi/CodeConvo huggingface dataset:
Change:
Do you want to request a feature or report a bug? bug What is the current behavior? does not work, the code is not executed, there are two files loaded from the Facebook servers but they both return a 5xx error If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via or similar (template: ). Go to and then click the link at the bottom to go to and then click on the link to jsfiddle in the text What is the expected behavior? that there is some generated output in the result pane Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Chrome (latest stable, Mac OS), Safari (Mac OS)
That’s a pretty old blogpost. I’m not sure why the integration broke, but I recommend to look at more modern examples (e.g. is up to date).
Well, this blogpost is still linked at the bottom here: So this is how I came there. By reading the guide and I thought I would get an uptodate guide with uptodate links ;-)
Fixed now. The new link is It will appear in the blog post the next time we sync our docs. Thanks!
Great. Thanks too.

Discussion:
> lightweight description of what the DOM should look like. We call this process **reconciliation**. Check out <del> [this jsFiddle](http://jsfiddle.net/fv6RD/3/) to see an example of </del> <ins> [this jsFiddle](http://jsfiddle.net/2h6th4ju/) to see an example of </ins> reconciliation in action. Because this re-render is so fast (around 1ms for TodoMVC), the developer
Change:
"npm run lint" fails on Windows, at least Windows 7. Error: Screenshot: ! I found this but I couldn't fix it anyway. What might it be?
I encountered the same problem. If you look into the code in , you'll find the following code: which spawns a new process using the command "node node_modules.bin .". The command tries to interpret a batch file using node. However node can interpret js files only. That's why there's a SyntaxError. A change like this should work as expected:
Would you like to send a PR if you have a working fix?
Sure. I'll fix the same problem in gulp flow task too.
I rolled this into

Discussion:
return function(done) { spawn( <del> process.execPath, </del> <ins> path.join('node_modules', '.bin', 'eslint' + extension), </ins> [ <del> path.join('node_modules', '.bin', 'eslint' + extension), </del> '.', ], {

return function(done) { spawn( <del> process.execPath, </del> <ins> path.join('node_modules', '.bin', 'flow' + extension), </ins> [ <del> path.join('node_modules', '.bin', 'flow' + extension), </del> 'check', '.', ],
Change:
I am using a few react components made by various libraries like material ui and i get this message on doing i can see only one version of react installed. I am using gulp and browserify for my build process. Any idea how i can solve this?
I've found this is common when modules have React as a dependency rather than a peerDependency in the npm package. If you're using webpack, I've got around this by creating an alias, perhaps you can do something similar in Gulp.
Awesome that helped.. Just sharing some ref for others Thanks.
Also please file issues in such libraries and gently ask them to use for instead .
For those who do not want to install any other packages for resolving. Configure a require key in the browserify object and that will take care of the error

Discussion:
static .grunt _SpecRunner.html <ins> __benchmarks__ </ins> build/ .module-cache *.gem
Change:
Do you want to request a feature or report a bug? Report a bug What is the current behavior? Referring to object's method from a another method within same object, , , breaks React build in Closure Compiler under advanced optimizations. If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via or similar (template: ). Build a React app using Closure Compiler in advanced mode. (Unfortunately I can not provide a source of the app where I got this bug.) What is the expected behavior? An app built with Closure Compiler in advanced mode should not throw exception Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React v15.4.2 Changing to solves this issue. There are other methods of object which are using properly via call. If this makes sense, I'll prepare a PR.
Seems reasonable. A PR would be great :)

Discussion:
if (mutationMethod) { mutationMethod(node, value); } else if (shouldIgnoreValue(propertyInfo, value)) { <del> this.deleteValueForProperty(node, name); </del> <ins> DOMPropertyOperations.deleteValueForProperty(node, name); </ins> return; } else if (propertyInfo.mustUseProperty) { // Contrary to `setAttribute`, object properties are properly
Change:
The shows:  Sometimes we will make a typo mistake,e.g., enter not , not ,and then the result are the same with the pic above.This will make us very confused. And sometimes will spend us 2 or more minutes to find the typo,because at first we will check the code when we first see the error,"oh,god,I don't use ,why the error says it should be a func?",and then check it again and again,and finally find that it's just a typo and react will treat the as a to check. I think this is not very friendly and the doc does not mention.Maybe it could be improved?
If it's really not what React intended, can I work on this to throw a relevant warning?
I think it's clear enough. It shows on console that the property type is invalid, so you start from there. The prop type can be any function, from PropTypes object or not.
You are right.But the point is that if you don't know react will treat the undefined as a func to check,then you will be very confused,it maybe will spend your a lot of time to figure it out especially for new people.And the doc doesn't mention this. So I agree that if you already know this,it will be easy to realize what the error means.But for new people,it's not very friendly.
PropTypes have been removed from React core and now exist as a separate package . Any future feature requests, bug reports, or changes should be directed to the new repo at
in python we have somthing called deprecation warning ¬¬
in python we have somthing called deprecation warning ¬¬ So do we, and PropTypes have been warning since April. And there's automated codemod that will change the code for you (it's in the link).

Discussion:
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41298772-1', 'facebook.github.io'); ga('send', 'pageview'); <ins> !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); </ins> </script> </body> </html>

## IRC Many developers and users idle on Freenode.net's IRC network in **[#reactjs on freenode](irc://chat.freenode.net/reactjs)**. <ins> ## Twitter [**#reactjs** hash tag on Twitter](https://twitter.com/search?q=%23reactjs) is used to keep up with the latest React news. <center><a class="twitter-timeline" data-dnt="true" data-chrome="nofooter noheader transparent" href="https://twitter.com/search?q=%23reactjs" data-widget-id="342522405270470656"></a></center> </ins>
Change:
Do you want to request a feature or report a bug? Bug What is the current behavior? Calling in in prior versions would return . Now it returns . I believe this was untested behavior before, but the new tests that were may check the wrong value: Changing this line to test for will exhibit the behavior. The fix would be to defer setting the flag to until after all mixins and the method were called on the component. Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? and anything using is broken. Working correctly in 15.4.x with .
I fixed this locally by splitting the IsMountedMixin into two: Then installing the Post after the spec has been mixed in: For the life of me I can't find the right repo to PR this against though.
This should be fixed with . Can you please verify?
I don't see that version published yet.
It's not set to (still an RC) but it exists: Will turn into 15.6.0 tomorrow.
Ah indeed. It's probably our internal registry being slow. I'll try it out soon.
Confirmed working correctly in .
Great. Thanks for sending the fix!

Discussion:
} } <del> var IsMountedMixin = { </del> <ins> var IsMountedPreMixin = { </ins> componentDidMount: function () { this.__isMounted = true; <del> }, </del> <ins> } }; var IsMountedPostMixin = { </ins> componentWillUnmount: function () { this.__isMounted = false; }

injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); <del> mixSpecIntoComponent(Constructor, IsMountedMixin); </del> <ins> mixSpecIntoComponent(Constructor, IsMountedPreMixin); </ins> mixSpecIntoComponent(Constructor, spec); <ins> mixSpecIntoComponent(Constructor, IsMountedPostMixin); </ins> // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) {

var instance; var Component = createReactClass({ displayName: 'MyComponent', <ins> mixins: [ { componentWillMount() { this.log('mixin.componentWillMount'); }, componentDidMount() { this.log('mixin.componentDidMount'); }, componentWillUpdate() { this.log('mixin.componentWillUpdate'); }, componentDidUpdate() { this.log('mixin.componentDidUpdate'); }, componentWillUnmount() { this.log('mixin.componentWillUnmount'); }, }, ], </ins> log(name) { ops.push(`${name}: ${this.isMounted()}`); },

instance.log('after unmount'); expect(ops).toEqual([ 'getInitialState: false', <ins> 'mixin.componentWillMount: false', </ins> 'componentWillMount: false', 'render: false', <ins> 'mixin.componentDidMount: true', </ins> 'componentDidMount: true', <ins> 'mixin.componentWillUpdate: true', </ins> 'componentWillUpdate: true', 'render: true', <ins> 'mixin.componentDidUpdate: true', </ins> 'componentDidUpdate: true', <del> 'componentWillUnmount: false', </del> <ins> 'mixin.componentWillUnmount: true', 'componentWillUnmount: true', </ins> 'after unmount: false', ]);
Change:
for example, when the original value is '.98', we need format it to '0.98'. but it is not take effect
This is working for me -
your example is not same with mine. the key is .98 can't be formated to 0.98. Because as number they are equal.
Just housekeeping. Do we close out issues before a release with the fix has shipped or wait?
typically I close the issue once the has been merged into master
Awesome, thanks! This should land in the next minor release of React:

Discussion:
<ins> const React = window.React; import Fixture from '../../Fixture'; class NumberInputDecimal extends React.Component { state = { value: '.98' }; changeValue = () => { this.setState({ value: '0.98', }); } render() { const {value} = this.state; return ( <Fixture> <div>{this.props.children}</div> <div className="control-box"> <input type="number" value={value} onChange={(e) => { this.setState({value: e.target.value}); }} /> <button onClick={this.changeValue}>change.98 to 0.98</button> </div> </Fixture> ); } } export default NumberInputDecimal; </ins>

// Simulate `input.valueAsNumber`. IE9 does not support it var valueAsNumber = parseFloat(node.value, 10) || 0; <del> // eslint-disable-next-line if (value != valueAsNumber) { </del> <ins> if ( // eslint-disable-next-line value != valueAsNumber || // eslint-disable-next-line (value == valueAsNumber && node.value != value) ) { </ins> // Cast `value` to a string to ensure the value is set correctly. While // browsers typically do this as necessary, jsdom doesn't. node.value = '' + value;

}); }); <ins> it('does change the string ".98" to "0.98" with no change handler', () => { class Stub extends React.Component { state = { value: '.98', }; render() { return <input type="number" value={this.state.value} />; } } var stub = ReactTestUtils.renderIntoDocument(<Stub />); var node = ReactDOM.findDOMNode(stub); stub.setState({value: '0.98'}); expect(node.value).toEqual('0.98'); }); </ins> it('should display `defaultValue` of number 0', () => { var stub = <input type="text" defaultValue={0} />; stub = ReactTestUtils.renderIntoDocument(stub);
Change:
Looks like something about the 'create-react-class' removal was not correctly cherry-picked into 15.6. Steps to reproduce: a new CRA project the version of React in to You'll get this error:

Discussion:
"node": ">=0.10.0" }, "dependencies": { <ins> "create-react-class": "^15.5.2", </ins> "fbjs": "^0.8.9", "loose-envify": "^1.1.0", "object-assign": "^4.1.0",
Change:
I think something like this both throws and prints success. This means that it is not safe to wrap this in a Promise like this for example: Because if this throws, then the error is silenced. The Promise was already resolved. I hit this in the ServerIntegration-test
Related:
has no render callbacks so I guess we're just not going to fix it in the old API.

Discussion:
* renders a div with a single child surrounded by whitespace with client render on top of bad server markup * renders >,<, and & as single child with client render on top of bad server markup * renders >,<, and & as multiple children with client render on top of bad server markup <del> * throws when rendering a string component with clean client render * throws when rendering a string component with client render on top of bad server markup * throws when rendering an undefined component with clean client render * throws when rendering an undefined component with client render on top of bad server markup * throws when rendering a number component with clean client render * throws when rendering a number component with client render on top of bad server markup </del> * renders an input with a value and an onChange with client render on top of bad server markup * renders an input with a value and readOnly with client render on top of bad server markup * renders an input with a value and no onChange/readOnly with client render on top of bad server markup

* renders >,<, and & as multiple children with clean client render * renders >,<, and & as multiple children with client render on top of good server markup * throws when rendering a string component with server string render <ins> * throws when rendering a string component with clean client render * throws when rendering a string component with client render on top of bad server markup </ins> * throws when rendering an undefined component with server string render <ins> * throws when rendering an undefined component with clean client render * throws when rendering an undefined component with client render on top of bad server markup </ins> * throws when rendering a number component with server string render <ins> * throws when rendering a number component with clean client render * throws when rendering a number component with client render on top of bad server markup </ins> * throws when rendering null with server string render * throws when rendering null with clean client render * throws when rendering null with client render on top of bad server markup

// promisified version of ReactDOM.render() function asyncReactDOMRender(reactElement, domElement) { <del> return new Promise(resolve => ReactDOM.render(reactElement, domElement, resolve), ); </del> <ins> return new Promise(resolve => { ReactDOM.render(reactElement, domElement); // We can't use the callback for resolution because that will not catch // errors. They're thrown. resolve(); }); </ins> } // performs fn asynchronously and expects count errors logged to console.error. // will fail the test if the count of errors logged is not equal to count.
Change:
This is a feature request. In React v15.6, HTMLDOMPropertyConfig, SVGDOMPropertyConfig, and ARIADOMPropertyConfig are available by them directly, e.g. . In v16, however, they are no longer available. I think they are not public parts of react-dom, but they are inevitable to implement , a library to build React DOM from an HTML text. See for how to use them.
I don't think we plan to expose them directly. Their format sometimes changes and we want to be able to make more under the hood changes to them in the future. While it is a bit annoying I encourage you to just copy and paste them (and update if you notice changes on our side).
I've created a package from .

Discussion:
#### <a href="http://fb.me/react-{{site.react_version}}.min.js">React Core {{site.react_version}} (production)</a> The compressed, production version of React core <ins> ```html <script src="http://fb.me/react-{{site.react_version}}.min.js"></script> ``` </ins> #### <a href="http://fb.me/react-{{site.react_version}}.js">React Core {{site.react_version}} (development)</a> The uncompressed, development version of React core with inline documentation. <ins> ```html <script src="http://fb.me/react-{{site.react_version}}.js"></script> ``` </ins> #### <a href="http://fb.me/JSXTransformer-{{site.react_version}}.js">JSX Transform</a> The JSX transformer used to support [XML syntax](/react/docs/syntax.html) in JavaScript. <ins> ```html <script src="http://fb.me/JSXTransformer-{{site.react_version}}.js"></script> ``` </ins> ## Bower ```sh
Change:
Observed this on react This renders as . If you try to hydrate this you'll get the error: Text content did not match. Server: "bc" Client: "b".
I suppose the bug here is that we do not separate from here but we should.
React has been released. Please update , , and (if you use it) to this version and let us know if it solved the issue! We’d appreciate if you could test before Monday when we plan to get out.
Everything looks good on my end, thanks!

Discussion:
expectTextNode(e.childNodes[1], 'bar'); } }); <ins> itRenders( 'a component returning text node between two text nodes', async render => { const B = () => 'b'; const e = await render(<div>{'a'}<B />{'c'}</div>); if ( render === serverRender || render === clientRenderOnServerString || render === streamRender ) { // In the server render output there's a comment between them. expect(e.childNodes.length).toBe(5); expectTextNode(e.childNodes[0], 'a'); expectTextNode(e.childNodes[2], 'b'); expectTextNode(e.childNodes[4], 'c'); } else { expect(e.childNodes.length).toBe(3); expectTextNode(e.childNodes[0], 'a'); expectTextNode(e.childNodes[1], 'b'); expectTextNode(e.childNodes[2], 'c'); } }, ); itRenders('a tree with sibling host and text nodes', async render => { class X extends React.Component { render() { return [null, [<Y key="1" />], false]; } } function Y() { return [<Z key="1" />, ['c']]; } function Z() { return null; } const e = await render( <div> {[['a'], 'b']} <div> <X key="1" /> d </div> e </div>, ); if ( render === serverRender || render === clientRenderOnServerString || render === streamRender ) { // In the server render output there's comments between text nodes. expect(e.childNodes.length).toBe(5); expectTextNode(e.childNodes[0], 'a'); expectTextNode(e.childNodes[2], 'b'); expect(e.childNodes[3].childNodes.length).toBe(3); expectTextNode(e.childNodes[3].childNodes[0], 'c'); expectTextNode(e.childNodes[3].childNodes[2], 'd'); expectTextNode(e.childNodes[4], 'e'); } else { expect(e.childNodes.length).toBe(4); expectTextNode(e.childNodes[0], 'a'); expectTextNode(e.childNodes[1], 'b'); expect(e.childNodes[2].childNodes.length).toBe(2); expectTextNode(e.childNodes[2].childNodes[0], 'c'); expectTextNode(e.childNodes[2].childNodes[1], 'd'); expectTextNode(e.childNodes[3], 'e'); } }); </ins> }); describe('number children', function() {

} var frame = this.stack[this.stack.length - 1]; if (frame.childIndex >= frame.children.length) { <del> out += frame.footer; this.previousWasTextNode = false; </del> <ins> var footer = frame.footer; out += footer; if (footer !== '') { this.previousWasTextNode = false; } </ins> this.stack.pop(); if (frame.tag === 'select') { this.currentSelectValue = null;

frame.debugElementStack = []; } this.stack.push(frame); <ins> this.previousWasTextNode = false; </ins> return out; } }
Change:
Check that they were a part of the latest internal sync. For stable releases, prefer that they’ve been landed for a week or so. Only skip this step if you really know what you’re doing! [x] You’re in [x] You’re in [x] You’re in [x] You’re in If not, ping someone on the team![x] Ensure you’re on [x] Do a . [x] Check that your local output matches the commit list. [x] Run in the repo root.[x] For : [x] Look at the version range of in root . [x] Ensure all depending on specify the same range. [x] Run in the repo root. (Don’t miss the caret!) [x] For : [x] Look at the version range of in root . [x] Ensure all depending on specify the same range. [x] Run in the repo root. (Don’t miss the caret!) [x] For : [x] Look at the version range of in root . [x] Ensure all depending on specify the same range. [x] Run in the repo root. (Don’t miss the caret!) [x] This might change the lockfile. This should not change any . [x] Commit the changes, if any. (see )[x] Edit: is broken in the 16 branch but this shouldn't block RC, and will be fixed asap by and in [x] Run in the repo root. [x] Run in the repo root. [x] Run in the repo root.[x] Run in the repo root. [x] If changes, [x] Maybe: If we still have a separate branch for docs when you’re reading this, we need to cherry-pick that commit to that branch. This makes sure the website decoder knows about the updated error codes. But ideally we should just change docs to serve from master. (See and ) [x] Update export in [x] Update in all : [x] [x] [x] [x] [x] If you see any other packages, update this list :-) [x] Run to verify your changes. [x][x] Run in the repo root.[x] Open in the browser for a smoke test. [x] It should say “Hello world!”[x] Go to and run [x] [x] Go to the repo root and run [x] Open http://localhost:5000/fixtures/packaging/ and verify every iframe shows “Hello World!”[x] Run [x] Run [x] Go to [x] For every subfolder: [x] For non-stable versions: Run in the subfolder. [x] For stable versions: Run in the subfolder.[ ] [ ] [ ]
w00t~

Discussion:
through2 "^2.0.0" fbjs@^0.8.9: <del> version "0.8.12" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04" </del> <ins> version "0.8.14" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" </ins> dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1"

asap "~2.0.3" prop-types@^15.5.8: <del> version "15.5.8" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394" </del> <ins> version "15.5.10" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" </ins> dependencies: fbjs "^0.8.9" <ins> loose-envify "^1.3.1" </ins> prr@~0.0.0: version "0.0.0"