PingThings interview question

How would you call an API inside of a React component?