Coinbase Frontend Interview Experience With Questions

Use any front-end framework or vanilla js to write a page. I used react+typescript (which really screwed me over).
The question is very simple. Write a page to add blog posts and give likes to each post. The html and css are already provided, so you don’t have to write them yourself! Just copy the code from the left and put it in the corresponding position. . I thought I had to write it myself at first and thought about how to structure the html. It
is divided into four levels.
Level 1:
Render the original posts to the page. This is very simple. Initialize the data in the imported json into the component, and then use .map() to render it. The
initial format is
{
id: string
author: string
text: string
}
Level 2:
Add a post blog method to the page. This question is also very simple. You need to put the textarea and input code from the left into the html, then add an onChange handler to the textarea and an onClick handler to the input. onChange is used to track the new posts you write in the textArea, and onClick is used to submit the post you wrote to the post list.
The id of each new post is generated by the package uuid, which has been pre-installed and can be called directly.
Level 4:
Add a like button to each post, and each click can add a like number. The more troublesome point of this question is that our initial post does not have the likes field, so when initializing the post state in the component, you need to add a default likes value of 0, and remember to initialize a like value when adding a new post in level2.
Level 3:
Use fetch or axios to fetch a url and get the post information. I didn’t look at this question carefully. . I didn’t have enough time.
Overall, the experience is very good, the recruiter is very efficient, and I was notified of the suspension the next day. . LZ was so stupid that he wrote it in typescript. If one type is not written correctly, it will not compile. He struggled for a long time when writing the onChange handler. Usually, onChange is handled by handleChange = (e) => {setPost(e.target.value)}, but in ts, it must be handled by handleChange = (e: React.ChangeEvent) => {setNewBlog(e.target.value)}. So he spent a lot of time on type. . . In the end, he didn’t finish it.
The question was not difficult, so he felt that he should not have failed. He will never write codesignal in ts again. ‍‌‌‌‌‌‌‌‌‌‍‌‌‌‍‍‍‍‌‌‍‌= =
I haven’t seen this question before. I have very few front-end interview experiences. I post it to earn RP. I wish you all good luck in finding a job! !