Code Monkey home page Code Monkey logo

flashcards's Introduction

Flashcards

challange project from Codecademy - React - Redux

Project Goals

In this project, you will practice using Redux and Redux Toolkit to manage the complex state of a flashcard-style quiz app.

  • Users will be able to create their own topics,
  • quizzes for those topics,
  • and flashcards for those quizzes.
  • Users will also be able to interact with their quizzes by flipping flashcards over.

Prerequisites

  • To complete this project, you should have completed React and Redux courses.

  • This app uses uuidv4() function from the uuid package to create unique identifiers for topics/quizzes/cards. Below, you can see an example of how this function is used:
    example code
    Though not required, if you would like to learn more about this function, check out its documentation.

  • This app uses react-router to handle routing between different pages. Since react-router is outside the scope of this project, we’ve written the routing code for you. Though not required, if you’re curious about how it works, you can explore App.js (where the routes for this app are defined), read the react-router docs, or take our Learn React Router course!

flashcards's People

Contributors

simonapiz avatar

Watchers

 avatar

flashcards's Issues

Project Requirements

At a high level, your application will be able to handle the following URL routes, each with their own functionality:

  • On the '/topics/new' page:

  • On the '/topics' page:

    • Users can view all topics
    • Users can click on an individual topic and be redirected to the page for that topic
  • On the /topics/:topicId page:

    • Users can view an individual topic and all quizzes for that topic
    • Users can click on a quiz associated with a topic and be redirected to that quiz’s page
  • On the 'quizzes/new' page:

  • On the '/quizzes' page:

    • Users can view all quizzes
    • Users can click on an individual quiz and be redirected to that quiz’s page
  • On the '/quizzes/:quizId' page:

    • Users can view an individual quiz and flip cards over

Fix submit new topic

When user submit a new topic, the render on a page '/topics' doesn't work.
log error:
TypeError: Cannot convert undefined or null to object in Topics.js:15:17

Users can add and remove card fields in the new quiz form

in the src/features/cards directory, create a new file containing slice for cards that:

  • Is named 'cards'
  • Has initial state consisting of an object that includes one property, cards, which corresponds to an empty object. This inner cards object will eventually hold all cards keyed by id.
  • Has an addCard action. This action will receive a payload of the form { id: '123', front: 'front of card', back: 'back of card'}.

Users can create quizzes that are associated with topics and contain lists of flashcards

Next task is to build out the necessary functionality to add quizzes to your app. This will involve creating two new slices—one for the quizzes themselves and one for the cards that comprise them—and adding an action to your topics slice to associate quizzes with the topic to which they belong. To start, create in the src/features/quizzes directory, create a new file containing a slice for quizzes that:

  • Is named 'quizzes'
  • Has initial state consisting of an object that includes one property, quizzes, which corresponds to an empty object. This inner quizzes object will eventually hold all quizzes keyed by id.
  • Has an addQuiz action. This action will receive a payload of the form { id: '123', name: 'quiz name', topicId: '456', cardIds: ['1', '2', '3', ...]}.
  • Export the selector as well as the action creators and reducer that your slice generates.

Udate Readme file

Udate README file:

  • live demo
  • img preview
  • Table of contents
  • tecnologies
  • Acknowledgements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.