rilyu / teaset

A UI library for react native, provides 20+ pure JS(ES6) components, focusing on content display and action control.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

我想知道SegmentedView里是如何实现不重新调用子view的render方法的

wanglaohushiwo opened this issue · comments

看segmentedview源码看了一遍,本来以为会在SegmentedView.Sheet的子view里重写shouldComponentUpdate方法(当opatity变化时不更新),但是却没有重写shouldComponentUpdate方法

找到原因了,是这个原因导致的,大家可以去查this.props.children not re-rendered on parent state change