Design comparison
Solution retrospective
I am a novice developer and many of the tasks were very difficult for me, but I set myself a whole list of all the tasks and I seem to have done it. Especially a lot of time I spent on overcoming errors.
I'm not sure how best to catch and handle response errors.
I feel that the fetchResults and onSearchSubmit functions in the App.js component could be more efficient. I would be grateful for advice on which practices to use in this case.
Community feedback
- @BinarySenseiiiPosted over 1 year ago
i've checked your font select file there are some areas where you can improve the code by using React's state and avoiding direct DOM manipulation. Here are some suggestions:
Use React state to manage font selection: Instead of setting a font value in a variable, use React state to manage the selected font. When a user selects a font, update the state and re-render the component.
Use React event handlers: Instead of using document.querySelector to manipulate the DOM directly, use React's event handlers to update the state and re-render the component. For example, instead of using addEventListener to listen for clicks on list items, use React's onClick event to handle click events n u can also use UseRef to get document reference
Marked as helpful0@yburdakovaPosted over 1 year ago@BloodySteps Thank you very much for your feedback! I will definitely implement your advices
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord