- React Design Patterns and Best Practices(Second Edition)
- Carlos Santana Roldán
- 208字
- 2021-06-24 15:43:36
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
推薦閱讀
- 物聯網安全:理論、實踐與創新
- 計算機網絡與數據通信
- 信息通信網絡建設安全管理概要2
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- 智慧城市中的移動互聯網技術
- 中小型局域網組建、管理與維護實戰
- 城市治理一網統管
- 網管第一課:網絡操作系統與配置管理
- Android UI Design
- Getting Started with nopCommerce
- Getting Started with Memcached
- Getting Started with tmux
- Guide to NoSQL with Azure Cosmos DB
- 中國信息化年鑒2017
- Hands-On Cloud:Native Microservices with Jakarta EE