随笔分类 -  React

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要:In this lesson we'll show how to use the AutoSizer component from react-virtualized to automatically measure the width/height of our content area. We' 阅读全文
posted @ 2017-06-27 03:09 Zhentiw 阅读(340) 评论(0) 推荐(0)
摘要:In this lesson we'll show how to use React.cloneElement to add additional properties to the children of a React element. We'll also show that you can 阅读全文
posted @ 2017-06-15 20:37 Zhentiw 阅读(280) 评论(0) 推荐(0)
摘要:In this lesson we'll show how to take a beforeUnload call and convert it to a declarative React Component. It will handle subscribing to events, and a 阅读全文
posted @ 2017-06-09 17:59 Zhentiw 阅读(755) 评论(0) 推荐(0)
摘要:In this lesson we'll create a Higher Order Component (HOC) that takes care of the key property that React looks for when using map to create elements 阅读全文
posted @ 2017-05-26 15:05 Zhentiw 阅读(217) 评论(0) 推荐(0)
摘要:Learn how to use the 'withPropsOnChange' higher order component to help ensure that expensive prop computations are only executed when necessary. Simp 阅读全文
posted @ 2017-05-16 21:11 Zhentiw 阅读(378) 评论(0) 推荐(0)
摘要:Learn how to user the ‘componentFromProp’ helper and ‘defaultProps’ higher order component to swap the underlying html tag of your component. Sometime 阅读全文
posted @ 2017-05-16 21:04 Zhentiw 阅读(222) 评论(0) 推荐(0)
摘要:Learn how to use the ‘branch’ and ‘renderNothing’ higher-ordercomponents to render nothing when a certain prop condition ismet. Sometimes you only wan 阅读全文
posted @ 2017-05-16 20:54 Zhentiw 阅读(230) 评论(0) 推荐(0)
摘要:Learn how to use the ‘branch’ and ‘renderComponent’ higher-order components to show errors or messaging when your component is in a non-optimal state. 阅读全文
posted @ 2017-05-16 15:58 Zhentiw 阅读(341) 评论(0) 推荐(0)
摘要:Learn how to use the 'branch' and 'renderComponent' higher-order components to show a spinner while a component loads. 阅读全文
posted @ 2017-05-16 03:57 Zhentiw 阅读(304) 评论(0) 推荐(0)
摘要:Learn how to use the ‘flattenProp’ higher order component to take a single object prop and spread each of its fields out as a prop. For example,we hav 阅读全文
posted @ 2017-05-15 15:13 Zhentiw 阅读(258) 评论(0) 推荐(0)
摘要:Learn how to use the ‘withProps’ higher order component to pre-fill a prop, unable to be overridden. withProps, take string as arguement for creating 阅读全文
posted @ 2017-05-15 03:42 Zhentiw 阅读(339) 评论(0) 推荐(0)
摘要:Learn how to use the 'mapProps' higher-order component to modify an existing component’s API (its props). 'mapProps' takes incoming props and changes 阅读全文
posted @ 2017-05-15 03:30 Zhentiw 阅读(281) 评论(0) 推荐(0)
摘要:Learn how to use the 'lifecycle' higher-order component to conveniently use hooks without using a class component. 阅读全文
posted @ 2017-05-15 03:06 Zhentiw 阅读(391) 评论(0) 推荐(0)
摘要:Learn how to use the 'withReducer' higher order component using the alternative reducer form. If you like using reducers in redux, you’ll be able to r 阅读全文
posted @ 2017-05-14 18:38 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:Learn how to use the 'withState' and 'withHandlers' higher order components to easily add local state to—and create a reusable local state pattern for 阅读全文
posted @ 2017-05-14 05:04 Zhentiw 阅读(278) 评论(0) 推荐(0)
摘要:In this lesson we'll take a stateful React component and look at how we can refactor our setState calls to use an updater function and then leverage R 阅读全文
posted @ 2017-04-21 04:01 Zhentiw 阅读(249) 评论(0) 推荐(0)
摘要:In this lesson, we'll refactor a React component to use Ramda lenses to update our component state. We'll create a lens to focus on the property we wa 阅读全文
posted @ 2017-04-21 03:49 Zhentiw 阅读(392) 评论(0) 推荐(0)
摘要:The problem we face daily when we do testing: The Data structure may changing, component outlook might changing... this makes it hard for us do testin 阅读全文
posted @ 2017-03-28 18:25 Zhentiw 阅读(583) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-03-28 04:10 Zhentiw 阅读(141) 评论(0) 推荐(0)
摘要:If a user has entered some input, or the current Route is in a “dirty” state and we want to confirm that data will be lost, React Router v4 provides a 阅读全文
posted @ 2017-03-23 04:35 Zhentiw 阅读(397) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页