Group project by: Maria Thomasson, Karoline Mann, Rosanna Dahlberg, Jenny Quach, Christoffer Torninger
This week our team's task was to build a quiz game using Redux. It's a multiple choice quiz, so we had to define our own questions and a bunch of possible answers to present to our users.
We got a project with quite a lot of code to begin with, including a Redux store. We used the state to render the quiz questions one at a time and also the possible answers. One of the problems we encountered was showing the correct colour of the button depending on the users submit answer. Our solution for this was to create an if else statement within the class name, using three different coloured buttons in the same class name.
What we have learnt:
- Work in a group in a more advanced way
- What is global state
- What is redux
- How to use selectors to access redux state
- How to use dispatch to trigger redux actions
- How to interact with your store using selectors or by dispatching actions
Redux React Javascript CSS