-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20-bc4eac5649ec72ccd951.js
1 lines (1 loc) · 2.63 KB
/
20-bc4eac5649ec72ccd951.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{676:function(e,t,o){"use strict";o.r(t),o.d(t,"default",function(){return x});var n=o(23),a=o.n(n),r=o(24),c=o.n(r),d=o(25),i=o.n(d),u=o(26),s=o.n(u),h=o(32),l=o.n(h),p=o(27),f=o.n(p),m=o(28),g=o.n(m),b=o(580),y=o.n(b),v=o(0),w=o.n(v),k=o(111);function T(e){return w.a.createElement(e.tag,y()({},e.attributes,{dangerouslySetInnerHTML:{__html:e.html}}))}function E(e){return w.a.createElement(T,{tag:"section",html:e.html,attributes:{className:"zandoc-react-markdown"}})}function j(e){return w.a.createElement(T,{tag:"style",html:e.style})}v.Component;var x=function(e){function t(){return a()(this,t),i()(this,s()(t).apply(this,arguments))}return f()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=location.hash;if(e){var t=document.querySelector('a[href="'.concat(e,'"]'));t&&Object(k.a)(document.documentElement,0,function e(t,o){for(;t;)return t.offsetTop&&"static"!==getComputedStyle(t).position&&(o+=t.offsetTop),e(t.parentNode,o);return o}(t,-9))}}},{key:"render",value:function(){return w.a.createElement("div",{className:"zandoc-react-container",key:null},w.a.createElement(j,{style:""}),w.a.createElement(E,{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>'}))}}]),t}(v.Component)}}]);