如何使用美化的javascript/反应? [英] how to use beautify for javascript/react?
本文介绍了如何使用美化的javascript/反应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经安装了Beautify以将其用于我的react.js代码.但是,它显然不能正确美化文件中的html格式.例如,
I have installed Beautify to use it for my react.js code. However, it apparently does not properly beautify the html format in the file. For example,
它变成这样:
到此:
在所有选项中,我应该使用哪个选项来解决此问题?
Among all the options, which option should I use to fix this ?
推荐答案
我曾经遇到过同样的问题.显然,beautify不支持JSX.我卸载了,取而代之的是安装了Prettier,它对我很有用.
I used to have the same problem. Apparently beautify doesn't support JSX. I uninstalled and instead of it, I installed Prettier, it works great for me.
希望我能帮到你.
这篇关于如何使用美化的javascript/反应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文