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

Writing a collapsible component

Our collapsible component should accomplish the following goals:

  • It should show and hide other components passed to it when tapped on
  • An animation will accompany this component, adding to the user experience of our app
  • The component should not make any assumptions about the type of data it is showing and hiding; it should not be strictly specific to DatePickerIOS in case we want to reuse the component for other purposes in the future

We'll need to take advantage of React Native's fantastic LayoutAnimation API, which is designed to let us create fluid and meaningful animations.

To begin, I've created an ExpandableCell component within the components folder of our project, like this:

|Tasks 
|__android
|__app
|____EditTask
|____ExpandableCell
|____TasksList
|____TasksListCell
|__ios
|__...
主站蜘蛛池模板: 科技| 色达县| 增城市| 罗定市| 轮台县| 佛教| 南宁市| 双城市| 柳河县| 临洮县| 蒙自县| 安徽省| 扎赉特旗| 岗巴县| 大余县| 宁安市| 平邑县| 崇文区| 云安县| 白水县| 五华县| 阿荣旗| 南漳县| 朝阳区| 高淳县| 梧州市| 鹤峰县| 枝江市| 囊谦县| 稷山县| 洪洞县| 芮城县| 东光县| 南陵县| 大余县| 南京市| 安国市| 太仆寺旗| 庆安县| 嘉义市| 乐至县|