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

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.

主站蜘蛛池模板: 淮滨县| 广水市| 修文县| 叙永县| 洛南县| 漳浦县| 巴塘县| 尉氏县| 封丘县| 德阳市| 揭阳市| 贵阳市| 昭觉县| 荥阳市| 德清县| 海城市| 固镇县| 仙游县| 巴彦县| 荣成市| 大渡口区| 济源市| 土默特左旗| 辽阳县| 西和县| 琼海市| 姚安县| 蒲江县| 贡嘎县| 邵阳县| 辽中县| 疏附县| 绵竹市| 鄂伦春自治旗| 富阳市| 托里县| 大理市| 静乐县| 凤凰县| 渭南市| 哈尔滨市|