Demo available at: https://amazing-ardinghelli-dab4e2.netlify.com/
A single page news app built with:
- React and React hooks
- Base Web React Components
- Create-react-app
- Powered by NewsAPI.org
React Hooks provide a more elegant way of writing components and managing their state and life cycle. In order to familiarise myself with a fundamentally new way of creating components, I have created this app based around individual stateful block and overarching state of fetched data from an external API.
Base-UI was used as a mature UI-kit that supplies ready-made but malleable components.
CRA was used to test limits and extendability of this particular boilerplate set.
- Clone the repository.
- Create a
config.js
file insrc
folder. - Register your own free api key at NewsAPI.org.
- Put your api key in
config.js
and export it. - Import your api key in
app.js
asapiKey
and remove the respective env variableprocess.env.REACT_APP_API_KEY
. - Use
npm run start
to run a development build or build the app withnpm run build
.