Code Monkey home page Code Monkey logo

tempo-exercise's Introduction

Tempo Technical Exercise

Important Details

To start, run npm start and open http://localhost:3000 to view it in the browser. The important pieces of code can be found in src/Components.

Approach

To start, I used create-react-app as a boilerplate for the React app. After looking at the REST endpoints provided, I searched for a way to store the data from the URLs and I found that Axios worked well with React. First, I created components to display the info from the team and user inputs to figure out how to using Axios. Once I could display the basic info on the webpage, I then worked on displaying the specific information for each team by creating a Team component to render the lead and member IDs using the team ID. Starting with the lead ID, I made a Lead component and tried to display the user info by using another axios.get call to the specific user endpoint. However, I encountered a CORS error, which I learned occurs when making calls to different domains. I struggled to try and find a way around this problem, since I needed the user ID from the team endpoint to access the specific user endpoint. Since I was able to get all the users using Axios, which included all the required info for the user, I decided to simply store the info of all the users, then find the specific user using the lead ID and only display the info for that user. For the team members, I thought that I would need to create a new Members component since the member ids were stored in an array. However, I eventually decided to use the map function to render a User component for each member ID in the array.

tempo-exercise's People

Contributors

zacharylee97 avatar

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.