Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG]生命周期hooks的回调会被多次执行 #172

Closed
krhougs opened this issue Aug 27, 2019 · 3 comments
Closed

[BUG]生命周期hooks的回调会被多次执行 #172

krhougs opened this issue Aug 27, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@krhougs
Copy link
Contributor

krhougs commented Aug 27, 2019

bug 描述
生命周期hooks的回调会被多次执行。

https://github.com/remaxjs/remax/blob/master/packages/remax/src/createPageConfig.ts#L56

复现代码

  useShareAppMessage(({ from, target }) => {
    const title = 'title'
    const path = '/pages/index/index'

    console.log('callback ran!')

    return {
      title,
      path
    }
  })

控制台会有多次内容为 callback ran! 的输出。

@krhougs krhougs added the bug Something isn't working label Aug 27, 2019
@yesmeck
Copy link
Member

yesmeck commented Aug 28, 2019

多次调用才会多次执行吧?

@yesmeck
Copy link
Member

yesmeck commented Aug 28, 2019

😟昨天晚上改坏了。

@yesmeck
Copy link
Member

yesmeck commented Aug 28, 2019

1.0.6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants