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

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
主站蜘蛛池模板: 乃东县| 县级市| 乌拉特前旗| 株洲县| 库尔勒市| 莒南县| 吐鲁番市| 临颍县| 浙江省| 金溪县| 安徽省| 伊宁市| 开鲁县| 桦甸市| 渝北区| 灵武市| 偏关县| 南涧| 图们市| 广汉市| 图片| 双城市| 乌兰浩特市| 平陆县| 股票| 萍乡市| 监利县| 涡阳县| 湘阴县| 曲麻莱县| 泸州市| 卢湾区| 德安县| 城市| 游戏| 福州市| 千阳县| 敖汉旗| 桃江县| 大化| 赤城县|