Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

钩子函数调用多次 #31

Closed
baikefun opened this issue Aug 14, 2020 · 3 comments
Closed

钩子函数调用多次 #31

baikefun opened this issue Aug 14, 2020 · 3 comments

Comments

@baikefun
Copy link

image

nodejs 版本升级到 12.16.3 启动后 出现还没打开页面就 不停的调用 serverPrefetch 和 created 钩子函数
降回到 11.15.0 后正常 但是每刷新一次页面出现钩子函数调用了2次的现象

@lzxb
Copy link
Contributor

lzxb commented Aug 14, 2020

你是不是所有的请求,都执行SSR的操作了?这样的话,页面刷新的时候,浏览器会发送一个 favicon.ico 请求,也会走SSR渲染的

@lzxb
Copy link
Contributor

lzxb commented Aug 14, 2020

你要打印一下SSR渲染的地址是多少,看看是什么请求导致的。

@baikefun
Copy link
Author

baikefun commented Aug 14, 2020 via email

@lzxb lzxb closed this as completed Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants