mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Rebuild website
This commit is contained in:
@@ -542,7 +542,7 @@
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Introducing React's Error Code System</title>
|
||||
<title>Introducing React's Error Code System</title>
|
||||
<description><p>Building a better developer experience has been one of the things that React deeply cares about, and a crucial part of it is to detect anti-patterns/potential errors early and provide helpful error messages when things (may) go wrong. However, most of these only exist in development mode; in production, we avoid having extra expensive assertions and sending down full error messages in order to reduce the number of bytes sent over the wire.</p>
|
||||
|
||||
<p>Prior to this release, we stripped out error messages at build-time and this is why you might have seen this message in production:</p>
|
||||
@@ -884,7 +884,7 @@ Minified build for production: <a href="https://fb.me/react-dom-15.0.0-r
|
||||
|
||||
<item>
|
||||
<title>React v15.0 Release Candidate</title>
|
||||
<description><p>Sorry for the small delay in releasing this. As we said, we&#39;ve been busy binge-watching House of Cards. That scene in the last episode where Francis and Claire Underwood <abbr title="You didn't think we would actually spoil anything did you?">████████████████████████████████████</abbr>. WOW!</p>
|
||||
<description><p>Sorry for the small delay in releasing this. As we said, we&#39;ve been busy binge-watching House of Cards. That scene in the last episode where Francis and Claire Underwood <abbr title="You didn't think we would actually spoil anything did you?">████████████████████████████████████</abbr>. WOW!</p>
|
||||
|
||||
<p>But now we&#39;re ready, so without further ado, we&#39;re shipping a release candidate for React v15 now. As a reminder, <a href="/react/blog/2016/02/19/new-versioning-scheme.html">we&#39;re switching to major versions</a> to indicate that we have been using React in production for a long time. This 15.0 release follows our previous 0.14 version and we&#39;ll continue to follow semver like we&#39;ve been doing since 2013. It&#39;s also worth noting that <a href="/react/blog/2016/01/12/discontinuing-ie8-support.html">we no longer actively support Internet Explorer 8</a>. We believe React will work in its current form there but we will not be prioritizing any efforts to fix new issues that only affect IE8.</p>
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Copyright 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a web interface for the HTML to JSX converter contained in
|
||||
* `html-jsx-lib.js`.
|
||||
*/
|
||||
;(function () {
|
||||
|
||||
var HELLO_COMPONENT = "\
|
||||
<!-- Hello world -->\n\
|
||||
<div class=\"awesome\" style=\"border: 1px solid red\">\n\
|
||||
<label for=\"name\">Enter your name: </label>\n\
|
||||
<input type=\"text\" id=\"name\" />\n\
|
||||
</div>\n\
|
||||
<p>Enter your HTML here</p>\
|
||||
";
|
||||
|
||||
var HTMLtoJSXComponent = React.createClass({
|
||||
displayName: "HTMLtoJSXComponent",
|
||||
|
||||
getInitialState: function () {
|
||||
return {
|
||||
outputClassName: 'NewComponent',
|
||||
createClass: true
|
||||
};
|
||||
},
|
||||
onReactClassNameChange: function (evt) {
|
||||
this.setState({ outputClassName: evt.target.value });
|
||||
},
|
||||
onCreateClassChange: function (evt) {
|
||||
this.setState({ createClass: evt.target.checked });
|
||||
},
|
||||
setInput: function (input) {
|
||||
this.setState({ input: input });
|
||||
this.convertToJsx();
|
||||
},
|
||||
convertToJSX: function (input) {
|
||||
var converter = new HTMLtoJSX({
|
||||
outputClassName: this.state.outputClassName,
|
||||
createClass: this.state.createClass
|
||||
});
|
||||
return converter.convert(input);
|
||||
},
|
||||
render: function () {
|
||||
return React.createElement(
|
||||
"div",
|
||||
null,
|
||||
React.createElement(
|
||||
"div",
|
||||
{ id: "options" },
|
||||
React.createElement(
|
||||
"label",
|
||||
null,
|
||||
React.createElement("input", {
|
||||
type: "checkbox",
|
||||
checked: this.state.createClass,
|
||||
onChange: this.onCreateClassChange }),
|
||||
"Create class"
|
||||
),
|
||||
React.createElement(
|
||||
"label",
|
||||
{ style: { display: this.state.createClass ? '' : 'none' } },
|
||||
"· Class name:",
|
||||
React.createElement("input", {
|
||||
type: "text",
|
||||
value: this.state.outputClassName,
|
||||
onChange: this.onReactClassNameChange })
|
||||
)
|
||||
),
|
||||
React.createElement(ReactPlayground, {
|
||||
codeText: HELLO_COMPONENT,
|
||||
renderCode: true,
|
||||
transformer: this.convertToJSX,
|
||||
showCompiledJSTab: false,
|
||||
editorTabTitle: "Live HTML Editor"
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(React.createElement(HTMLtoJSXComponent, null), document.getElementById('jsxCompiler'));
|
||||
})();
|
||||
Reference in New Issue
Block a user