我最近在用Router5.0做,服务端代码总是会报些错误,导致服务端渲染不成功

来源:3-8 服务端问题解决mobx的warning以及增加title等SEO友好标签

风铃草React

2019-07-26

Warning: Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?
Warning: Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?
(node:4872) UnhandledPromiseRejectionWarning: Error: Invariant failed: You should not use outside a

写回答

1回答

Jokcy

2019-07-28

你提供的都是warning信息啊,真正的错误信息反而没给全。warining并不会导致失败

0
2
Jokcy
回复
风铃草React
好的!
2019-07-30
共2条回复

React全栈+服务器渲染(ssr)打造社区Webapp

【毕设面试】只会写业务代码?out了,带你学会搭建属于自己的工程!

768 学习 · 414 问题

查看课程