![]() If we want to use an icon from Material-UI Community Icons, we can import and use the icon component we built already. Then, add the following: module.exports = from './Icon' Now, create a new file in your project folder called : touch Once you’ve downloaded the file, unzip it and add your chosen font weights to the fonts folder: For this example, we’re going with Nunito, but feel free to diverge with a font of your choice. ![]() Head over to Google Fonts to download a font family. Or you can use the terminal: mkdir -p assets/fonts In your project folder, create a new folder called assets, then create another folder inside it called fonts. React Native Asset makes linking and unlinking more straightforward than using react-native link.įirst, install react-native-asset globally: yarn global add react-native-asset Linking and unlinking with React Native AssetĪs software developers, anything that improves our workflow is a welcome change. The next step is to build our app for each OS. This will create a new React Native project with a TypeScript template. To initialize a React Native project, paste the following into your terminal: npx react-native init yourAppNameHere -template react-native-template-typescript & cd yourAppNameHere Creating an icon button component in React Native. ![]()
0 Comments
Leave a Reply. |