官术网_书友最值得收藏!

Clean Up Your Code

This chapter assumes that you already have experience with JSX and you want to improve your skills to use it effectively. To use JSX without any problems or unexpected behaviors, it is essential to understand how it works under the hood, and the reasons why it is a useful tool for building UIs.

Our goal is to write clean and maintainable JSX code, and to achieve that we have to know where it comes from, how it gets translated to JavaScript, and which features it provides.

In the first section, we will do a little step back, but please bear with me because it is crucial to master the basics to apply the best practices.

In this chapter, we will cover the following topics:

  • What is JSX, and why should we use it?
  • What is Babel and how can we use it to write modern JavaScript code?
  • The main features of JSX and the differences between HTML and JSX
  • Best practices to write JSX in an elegant and maintainable way
  • How linting, and ESLint in particular, can make our JavaScript code consistent across applications and teams
  • The basics of functional programming and why following a functional paradigm will make us write better React components
主站蜘蛛池模板: 满城县| 垦利县| 广平县| 凌海市| 南汇区| 自治县| 宁德市| 榆林市| 寻乌县| 桑植县| 四子王旗| 新龙县| 青龙| 绥中县| 万载县| 修水县| 淮北市| 稷山县| 雅安市| 绥德县| 东至县| 大关县| 泊头市| 永年县| 克什克腾旗| 普陀区| 甘泉县| 台南县| 都安| 临武县| 天镇县| 漯河市| 麻城市| 永川市| 武安市| 勃利县| 永登县| 霍山县| 射阳县| 海城市| 阿巴嘎旗|