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

The basics of functional programming

Apart from following the best practices when we write JSX and use a linter to enforce consistency and find errors earlier, there is one more thing we can do to clean up our code: follow a functional programming (FP) style.

As discussed in Chapter 1, Taking Your First Steps with React, React has a declarative programming approach that makes our code more readable.

FP is a declarative paradigm, where side-effects are avoided, and data is considered immutable to make the code easier to maintain and to reason about.

Don't consider the following section an exhaustive guide to functional programming; it is only an introduction to get started with some concepts that are commonly used in React of which you should be aware.

主站蜘蛛池模板: 都匀市| 诏安县| 沐川县| 崇州市| 英山县| 南平市| 社会| 舟曲县| 平度市| 班玛县| 分宜县| 昌吉市| 绵阳市| 汕头市| 香河县| 天峨县| 佛冈县| 乌拉特中旗| 肇源县| 翁源县| 陆丰市| 疏附县| 青龙| 荃湾区| 瑞安市| 定远县| 界首市| 旌德县| 凭祥市| 桐乡市| 三河市| 屏边| 任丘市| 乌鲁木齐市| 六安市| 绥棱县| 开鲁县| 沙河市| 洛浦县| 尚义县| 和田市|