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

Using vector icons

For this app, we will use two icons: a plus sign to add feeds and a trash bin to remove them. React Native doesn't include a list of icons to be used by default, so we will need to add one. In our case, since we are using native-base as our UI library, it's very convenient to use react-native-vector-icons, as it is supported natively from native-base, but it requires one extra configuration step:

react-native link

Some libraries use extra native capabilities which are not present in React Native. In the case of react-native-vector-icons, we need to include a number of vector icons stored in the library accessible natively. For these kinds of tasks, React Native includes react-native link, a script to automatically link the provided library to prepare all the native code and resources, which are needed for this library to be accessible within our app. Lots of libraries will require this extra step, but thanks to React Native's CLI, it is a very simple step, which in the past required moving files around projects and messing with configuration options.

主站蜘蛛池模板: 融水| 昌乐县| 浦东新区| 耿马| 四平市| 台南市| 临澧县| 甘南县| 广安市| 林甸县| 澄江县| 闸北区| 贵港市| 峡江县| 修文县| 宝应县| 岳池县| 平利县| 获嘉县| 汝阳县| 米易县| 曲阳县| 天台县| 剑阁县| 庆阳市| 抚顺市| 民乐县| 高台县| 四川省| 仙游县| 福安市| 永城市| 安远县| 龙泉市| 尤溪县| 怀仁县| 搜索| 长白| 肥城市| 广州市| 喀什市|