javascript - Server side rendering How to debug?
PHPz
PHPz 2017-05-19 10:40:37
0
1
642

When doing react front-end development, as we all know, you can use console.log to easily view information in the browser's devtools.

Then the problem comes. When doing react server rendering, console.log is printed in the command line, and detailed information cannot be viewed.

For example, function expression.

How to debug server-side rendering? Are there any tools? Thanks

The answer has been found: Redirect the terminal output of node.js to the browser console

PHPz
PHPz

学习是最好的投资!

reply all(1)
PHPzhong

What language server is used for server-side rendering?

react的服务端渲染是需要一个js的上下文的,理论上 ruby 或者其他语言都是可以做到在自己的环境中起一个jscontext,但是总归没有直接用nodeIt’s so refreshing.

so, if you use node那该console.log的地方还是会直接lognode serverlog, if you use other languages ​​​​since it is the context of js, of course the log will also be typed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template