feat:添加shouldComponentUpdate方法 #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
close #9
请解释此次更改的 动机,以下是一些帮助您的要点:
1.添加shouldComponentUpdate方法:
houldComponentUpdate 是 React 中的一个生命周期方法,用于优化组件的渲染性能。它的作用是决定组件是否需要重新渲染。通过实现这个方法,你可以控制组件在 props 或 state 发生变化时是否进行重新渲染。
Test Plan
展示代码的稳定性。例如:用来复现场景的命令输入和结果输出、测试用例的路径地址,或者附上截图和视频。
测试用例地址:https://github.com/MyAndroidNetZWJ/RNOHDCS/tree/main/react-native-material-dropdown
Checklist