-
### Library
React Components / v9 (@fluentui/react-components)
### Describe the feature that you would like added
It would be great to have linter rules to avoid common mistakes with using Fl…
-
## Overview
### What this article is about
This article summarizes the best practices for designing a React app using @tanstack/react-query, under the premise that your restful APIs are well d…
-
I generally use the approach in the code below.
```js
import { queryClient } from "@sustable/system";
export const useDeleteUserMutation = createMutation({
mutationKey: ["corporate", "user", …
-
命令编程和声明编程的区别:
命令是如何完成某件事(call waitress to hold glass and pout beer in it then give me),详细地指出step;声明是直接要某件事的结果。(Beer please)。
声明式编程的代码简洁 易于维护
声明式编程不需要使用变量也不需要在执行的时候追踪value更新。本质上声明式的编程就是避免创建和修改st…
-
### Discussed in https://github.com/WordPress/developer-blog-content/discussions/205
Originally posted by **gaambo** January 12, 2024
I think a lot of WordPress developers are pretty familiar …
-
当React必须显示一个组件的时候,它调用组件的render方法并且递归调用children的render方法。最终render方法会返回一个React元素树,React使用这个树来决定必须做那个DOM操作来更新UI。
任何时候组件的状态改变,React会再次调用节点的render方法,它会把结果和上一次的元素树进行比较。react能够知道状态(DOM)更新的最小操作。这就是reconcil…
-
React 里的反模式
使用props初始化state:但是在props不变的情况下还是会使用它。它会有俩个问题:1、重复数据源(props, state)2、props改变,state不会更新。当然这两个问题都可以解决。
直接修改state:会导致组件的一致性和性能问题。因为1、state改变,但是组件没有重新渲染2、后续的setState会使用改变过的state。记住state是要存…
-
React 是单向数据流,是从react组件树的顶端流向底部的、
props是不能被修改的(你懂得)
父组件向子组件通信(props)。
子组件向父组件通信(callback)
相邻组件通信(common parent)
React的一个最佳实践就是:
把组件尽可能的拆分成具有某一个特定行为的多个小组件,特别是展示的那部分。
通常在写React的时候,一般是要组件 意…
-
- look into aria-* and semantic elements
- improve the ErrorBoundary in TTS KING (copy from Specify)
- ErrorBoundary already console.errors on errros, no need to do so
again
- Add posi…
-
Title: "Scalable Strapi-React Apps with TypeScript: Best Practices"
Description: This blog post will explore the process of building scalable React applications powered by Strapi CMS using TypeScri…