-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
problemProblem statement to be solvedProblem statement to be solved
Description
React Interview Challenge: The Polling Booth
Objective: Implement a simple real-time polling application using React.
Company: Eventbrite (Source)
Problem Statement
Scenario:
You are tasked with creating a polling application where users can vote between two choices. The UI should be intuitive and responsive, providing immediate feedback to user interactions.
Requirements:
-
Choices Display: Present the user with two choices. Each choice will have its own label and a corresponding "Vote Me" button.
-
Voting Mechanism:
- Users should be able to click on the "Vote Me" button of a choice to cast their vote.
- Users can vote multiple times for any choice.
- Each click on the "Vote Me" button counts as one vote.
-
Real-time Results:
- Display the real-time results at the bottom of the choices. The results should update immediately after a vote is cast.
- The result display should show the number of votes each choice has received.
-
Winner Declaration:
- Below the real-time results, provide a button labeled "Declare Winner".
- When clicked, this button should determine the choice with the most votes and display it as the winner.
- Once the winner is declared, both "Vote Me" buttons should be disabled to prevent further voting.
- If the votes are tied, indicate that there is no clear winner.
Bonus:
- Use CSS to style your components, providing a visually appealing interface.
- Add a simple animation to the vote count to make the real-time updating more dynamic.
- Implement the functionality such that it would be easy to scale from two choices to multiple choices in the future.
Evaluation Criteria
Your solution will be evaluated based on the following:
- Functionality: Does the solution satisfy all the given requirements?
- Code Organization: Is the application's codebase structured logically and cleanly?
- Clarity: Is the codebase understandable, with meaningful variable/function/component names?
- Design: Is the application visually appealing and user-friendly?
- Responsiveness: How well does the application handle a rapid sequence of votes?
- Extensibility: How easy would it be to extend the features or scale the choices?
Metadata
Metadata
Assignees
Labels
problemProblem statement to be solvedProblem statement to be solved