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

  • React Native Blueprints
  • Emilio Rodriguez Martinez
  • 185字
  • 2021-07-02 15:20:02

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.

主站蜘蛛池模板: 新河县| 仲巴县| 科技| 西藏| 潼关县| 万载县| 二连浩特市| 沙河市| 楚雄市| 炉霍县| 巨野县| 马公市| 交城县| 长泰县| 普定县| 长泰县| 肥东县| 惠东县| 芒康县| 滦平县| 友谊县| 揭阳市| 定边县| 新余市| 淮安市| 什邡市| 青海省| 江达县| 龙山县| 尼勒克县| 邢台县| 蓬安县| 长沙市| 四会市| 涟水县| 吐鲁番市| 聂拉木县| 焦作市| 葫芦岛市| 屏东县| 宁德市|