File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -598,9 +598,6 @@ input { display: block; margin-bottom: 20px; }
598
598
599
599
下面提供一些常用的 Effect 应用模式。
600
600
601
- <<<<<<< HEAD
602
- ### 控制非 React 组件 {/*controlling-non-react-widgets*/}
603
- =======
604
601
<Pitfall>
605
602
606
603
#### Don't use refs to prevent Effects from firing {/*dont-use-refs-to-prevent-effects-from-firing*/}
@@ -628,8 +625,7 @@ See the examples below for how to handle common patterns.
628
625
629
626
</Pitfall>
630
627
631
- ### Controlling non-React widgets {/*controlling-non-react-widgets*/}
632
- >>>>>>> 0b9ae66066cccce35832c35097d6cafacd99c098
628
+ ### 控制非 React 组件 {/*controlling-non-react-widgets*/}
633
629
634
630
有时需要添加不是使用 React 编写的 UI 小部件。例如,假设你要向页面添加地图组件,并且它有一个 ` setZoomLevel ()` 方法,你希望调整缩放级别(zoom level)并与 React 代码中的 ` zoomLevel` state 变量保持同步。Effect 看起来应该与下面类似:
635
631
You can’t perform that action at this time.
0 commit comments