We will be using React Native components to modify the Headlines.js file located in the screens folder. You can access the code by using in git clone -b dev https://github.com/TheStanfordDaily/stanforddaily-mobile.git the terminal. To add Sports to the home screen, follow these steps:
Add a CardRow directly below the Opinions section and directly above Arts & Life.
Set data={allArticles['sports']}.
Set renderItem={_renderCardRow}
Set title={"Sports"}
Close the component with />.
If you have a different vision for how the Sports section should look, try a FlatList, or feel free to come up with your own reusable component. Remember to send the changes to the repository. If you experience any difficulties with that, try this tutorial.
We will be using React Native components to modify the
Headlines.js
file located in thescreens
folder. You can access the code by using ingit clone -b dev https://github.com/TheStanfordDaily/stanforddaily-mobile.git
the terminal. To add Sports to the home screen, follow these steps:CardRow
directly below the Opinions section and directly above Arts & Life.data={allArticles['sports']}
.renderItem={_renderCardRow}
title={"Sports"}
/>
.If you have a different vision for how the Sports section should look, try a
FlatList
, or feel free to come up with your own reusable component. Remember to send the changes to the repository. If you experience any difficulties with that, try this tutorial.