/Bookstore

Asimple API based book store that lets users add books to their inventory or delete books

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

Bookstore App Actions and Reducers

Learning Objectives

  • Add Redux Toolkit using npm install react-redux @reduxjs/toolkit
  • Write book actions and reducer (in /src/redux/books/books.js) using the ducks pattern.
  • Write categories actions and reducer (in /src/redux/categories/categories.js) using the ducks pattern.
  • Configure the Redux Store (/src/redux/configureStore.js)
  • Understand the concept of state management.
  • Use store, actions and reducers in React.
  • Connect React and Redux.
  • Connect an existing API via Redux and use the data to display something in a UI.

Description

Configure Redux Store and write actions and reducer for adding and removing books.

General requirements

Built With

  • React and Redux

Setup instructions for Different OS's

Milestone Reached

  • Set up React App
  • Creatd a directory called components.
  • Inside components, created Categories, Boolist, Book, Form, Header and Home components.
  • Used React Router.
  • Used css to apply basic styles.
  • Used useSelector to consume the state.
  • Imported Redux Provider and store in the main component of React app.
  • Imported Redux useDispatch.
  • Used fetch with createAsyncThunk for making API calls.
  • Fetched book list from Bookstore API on Books page load
  • Refactored add book and remove book features to persist changes in the server.

npm start

Runs the app in the development mode.\ Or Open http://localhost:3000 to view it in your browser.

Live Demo

Live Demo Link

Authors

👤 KASAIJA KENNETH

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

This project is licensed.