Preact: InnerMost Component isn't firing 'WillMount', 'DidMount' when re-render

Created on 10 May 2016  路  9Comments  路  Source: preactjs/preact

in my case:

App:
  <div><Panel /></div>

Panel:
  <div><Title /></div>

render(<App/>, document.body)

when the <Panel/> re-render, the <Title/> isn't firing 'WillMount', 'DidMount' etc.

codepen: http://codepen.io/ryan_ou/pen/QNYegz?editors=0011

bug important

All 9 comments

@zhenkunou Looks like this is part of the regression in 4.6.2 (reverting to 4.6.0 fixes your codepen example), currently my top priority. I'll keep you posted as I progress, thanks for the demo!

Fix is on the way! :)

Awesome!

@zhenkunou I've released this under the beta tag: npm i -S preact@beta

Marking this as closed since both of our tests pass. I'll make an announcement when it's rolled out of beta :)

Note: confirmed fix verification http://codepen.io/developit/pen/reXZvd?editors=0010

Great work, Thanks!!!
Everything is fine, only one issue i found today, pls take a look. issue: #162

@developit it seem that the bug is still here:

  div
     Inner1Component
        div
          Inner2Component
            div
              Inner3Component
...

render(<OuterComponent />, document.body)

The Inner3 Component 'DidMount' not being called when re-render.

http://codepen.io/ryan_ou/pen/QNYegz?editors=0011
codepen changelog:
upgrade to preact@beta
add more inner component

@zhenkunou Yikes! Sorry about that - I've got a fix coming. The original fix missed a code path for remounting nested trees of components.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mizchi picture mizchi  路  3Comments

youngwind picture youngwind  路  3Comments

matuscongrady picture matuscongrady  路  3Comments

KnisterPeter picture KnisterPeter  路  3Comments

matthewmueller picture matthewmueller  路  3Comments