随笔分类 -  React

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页
摘要:In this lesson, we’ll make a few small changes to our scripts and add some environment variables that will be used at build time to get our applicatio 阅读全文
posted @ 2017-09-06 21:19 Zhentiw 阅读(544) 评论(0) 推荐(0)
摘要:Starting from v15.5 if we wanted to use React's PropTypes we had to change our code to use a separate node module, now we can go one step further and 阅读全文
posted @ 2017-09-02 16:50 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要:For example we have the following code: Because we wrote as function component, it is using the implicit return. To debug what props have been passed 阅读全文
posted @ 2017-08-30 15:44 Zhentiw 阅读(197) 评论(0) 推荐(0)
摘要:In this lesson, we extend the styles of a base button component to create multiple variations of buttons, using "extend". We can then modify the base 阅读全文
posted @ 2017-08-17 02:53 Zhentiw 阅读(233) 评论(0) 推荐(0)
摘要:In this lesson, we learn how to handle CSS keyframe animations in styled-components, via the 'keyframes' helper. 阅读全文
posted @ 2017-08-17 02:49 Zhentiw 阅读(393) 评论(0) 推荐(0)
摘要:In this styled-components lesson, we set a "primary color" within a UI "theme" object. We make this theme accessible to all components by wrapping our 阅读全文
posted @ 2017-08-14 01:41 Zhentiw 阅读(856) 评论(0) 推荐(0)
摘要:Most of the time, your components respond to events that occur within the component tree by defining their own handler or by accepting a handler defin 阅读全文
posted @ 2017-08-04 20:18 Zhentiw 阅读(253) 评论(0) 推荐(0)
摘要:In this lesson, we see how we can apply styles globally with the "injectGlobal" helper method in styled-components. This method allows us to apply sty 阅读全文
posted @ 2017-08-02 02:42 Zhentiw 阅读(714) 评论(0) 推荐(0)
摘要:In this lesson, we remove the mapping between a React component and the styles applied to it via classnames. We write our styles directly within the c 阅读全文
posted @ 2017-08-02 02:38 Zhentiw 阅读(626) 评论(0) 推荐(0)
摘要:Some browsers, such as Safari < 10 & IE < 11, do not support the JavaScript Internationalization API, which react-intl depends on. In order to support 阅读全文
posted @ 2017-07-31 21:43 Zhentiw 阅读(426) 评论(0) 推荐(0)
摘要:In some cases, you might need to pass a string from your intl messages.js file as a prop to a component. Instead of using react-intl components (which 阅读全文
posted @ 2017-07-31 21:06 Zhentiw 阅读(313) 评论(0) 推荐(0)
摘要:Get 'injectIntl' from 'react-intl', it is a high order componet. We need to wrap our component into 'injectIntl': It will inject 'intl' prop into our 阅读全文
posted @ 2017-07-31 21:02 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:Using the react-intl FormattedMessage component, we’ll learn how to render content conditionally in our messages based on a number provided as a prop. 阅读全文
posted @ 2017-07-31 15:53 Zhentiw 阅读(235) 评论(0) 推荐(0)
摘要:Using a react-intl FormattedNumber component, we'll pass a Number and a few additional props in order to render the correct separator and currency sym 阅读全文
posted @ 2017-07-28 20:18 Zhentiw 阅读(328) 评论(0) 推荐(0)
摘要:Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2 days ago”, in various langu 阅读全文
posted @ 2017-07-28 20:09 Zhentiw 阅读(300) 评论(0) 推荐(0)
摘要:Using the react-intl FormattedDate and FormattedTime components, we’ll render a JavaScript Date into both a date string and a time string in different 阅读全文
posted @ 2017-07-28 20:01 Zhentiw 阅读(738) 评论(0) 推荐(0)
摘要:In this lesson, we’ll use the react-intl FormattedHTMLMessage component to display text with dynamic values along with other HTML elements to create e 阅读全文
posted @ 2017-07-28 19:52 Zhentiw 阅读(689) 评论(0) 推荐(0)
摘要:Learn how to use react-intl to set dynamic values into your language messages. We’ll also learn how to pass in those values by using a values prop in 阅读全文
posted @ 2017-07-28 19:45 Zhentiw 阅读(384) 评论(0) 推荐(0)
摘要:We’ll install react-intl, then add it to the mounting point of our React app. Then, we’ll use react-intl helpers to load locales in our app, including 阅读全文
posted @ 2017-07-28 18:31 Zhentiw 阅读(341) 评论(0) 推荐(0)
摘要:In this lesson we'll use CellMeasurer and CellMeasurerCache to automatically calculate and cache the height of a row. This will allow us to remove the 阅读全文
posted @ 2017-06-27 03:22 Zhentiw 阅读(513) 评论(0) 推荐(1)

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