-
Notifications
You must be signed in to change notification settings - Fork 0
/
4229-ff1883cb9e5217cdbe8f.js
1 lines (1 loc) · 2.89 KB
/
4229-ff1883cb9e5217cdbe8f.js
1
(self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[4229],{84229:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>l});var r=o(73450),n=o(27378),a=o(57318),c=o(24246);function s(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function d(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(Object(o),!0).forEach((function(t){(0,r.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e){return(0,c.jsx)(e.tag,d(d({},e.attributes),{},{dangerouslySetInnerHTML:{__html:e.html}}))}function u(e){return(0,c.jsx)(i,{tag:"section",html:e.html,attributes:{className:"zandoc-react-markdown"}})}function p(e){return(0,c.jsx)(i,{tag:"style",html:e.style})}function h(e,t){for(;e;)return e.offsetTop&&"static"!==getComputedStyle(e).position&&(t+=e.offsetTop),h(e.parentNode,t);return t}class l extends n.Component{componentDidMount(){var e=location.hash;if(e){var t=document.querySelector('a[href="'.concat(e,'"]'));t&&(0,a.l)(document.documentElement,0,h(t,-9))}}render(){return n.createElement("div",{className:"zandoc-react-container"},n.createElement(p,{style:""}),n.createElement(u,{html:'<h2 class="anchor-heading"><a href="#upgrade-to-zent-2-1-0">¶</a><a href="javascript:void(0)" id="upgrade-to-zent-2-1-0" class="anchor-point"></a>Upgrade to Zent 2.1.0</h2>\n<p>We upgraded React to 15.5.x in this version.</p>\n<h3 class="anchor-heading"><a href="#react-15-5-x">¶</a><a href="javascript:void(0)" id="react-15-5-x" class="anchor-point"></a>React 15.5.x</h3>\n<p>All development of Zent will be based on React 15.5.x starting from 2.1.0.</p>\n<p>There may be warnings if you use Zent with old version of React.</p>\n<p>You can read the <a href="https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html">offical React upgrade guide</a>.</p>\n<p>We recommend Facebook\'s <a href="https://github.com/reactjs/react-codemod">codemod</a> to automate the upgrade.</p>\n<h3 class="anchor-heading"><a href="#button">¶</a><a href="javascript:void(0)" id="button" class="anchor-point"></a>Button</h3>\n<p><code>Button</code>\'s default <code>htmlType</code> has changed. <code>htmlType</code> defaults to <code>"button"</code> starting from 2.1.0.</p>\n<p><code>Button</code> has an <code>htmlType</code> prop,this prop has no default value before 2.1.0, just like the native <code>button</code>\'s <code>type</code> attribute. So if you put a <code>Button</code> into a <code>form</code>, it will trigger form submition when clicked before 2.1.0.</p>\n<p>You may need to add <code>htmlType="submit"</code> in your forms if you relied on old behavior.</p>'}))}}}}]);