Senior Frontend engineer Round 1 interview question

Title
Apple - Senior Frontend Engineer - Round 1 Technical

Description:
Level: Senior Frontend Engineer
Education: MS
Years of Experience: 4+
Questions Asked:

  1. Write a react code that displays users, their orders and order details on click.
    There is already an mock api written to consume data. No need to worry about CSS much and for the sake of the test we can render all 3 data points in the same page.
  • 1a. Show all the Users
  • 1b. On click of an user show all orders for that user
  • 1c. On click of an order show order details

Initially I was asked how I would design the solution. Then I was asked to implement it.

Solution:
I suggested users list view and on click user transition to users orders list view and on click a order transition to order details view. Which is complicated for the test so other solution was to develop a feed like single page solution, similar to accordion.

Result:
It was pretty easy task in my opinion but did not do well on the hands on coding due to my lack of practice.