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
while use getChildContext() we cannot update child component while state changed while hoc component, please see inferno test code
import{render,Component}from'inferno';classFormextendsComponent<any,any>{publichandleClick=()=>{this.forceUpdate();}publicstaticchildContextTypes={};publicgetChildContext(){return{};}publicrender(){const{ children, ...restProps}=this.props;return(<div{...restProps}><buttononClick={this.handleClick}>test</button>
{children}</div>);}}classTestextendsComponent{publicrender(){// while click `test` button it should be render again and again// it works perfectly in react.16.4 but breaks in inferno 5.3.0console.log('test');return(<div>hellotest</div>);}}classAppextendsComponent{publicrender(){return(<Form><div><div>{/* Note there is nested div wrapper */}<Test/></div></div></Form>);}}render(<App/>, document.getElementById('app'));(document.querySelector('#global-spinner')asany).remove();
…ere can be custom logic, context changes etc. Fixes Github #1369 and Github #1345 Separated also textNode handling from contentEditable elements by adding new vNodeFlag this improves performance when no contentEditable elements are used and fixes Github #1186
Observed Behaviour
while use getChildContext() we cannot update child component while state changed while hoc component, please see inferno test code
Expected Current Behaviour
it works like react as below code
Inferno Metadata
macOS
Safari
The text was updated successfully, but these errors were encountered: