Design comparison
Solution retrospective
Any Feedback or suggestions are welcome :)
Community feedback
- @theYuunPosted 10 months ago
So I mentioned your reduction of whitespace on a page in another project being for the better, but here is an example of where it can be of use. The top margins on your sections are a bit too tight, making it look like the headings are a part of the previous section. Otherwise, great work!
Marked as helpful1 - @petritnurediniPosted 10 months ago
Congratulations on completing your React project! It's great to see your dedication to learning and building with React. Here are a few best practices and suggestions to consider for your next steps:
-
Component Structure and Props:
- Your components are well-organized, which is excellent. To enhance this, consider passing data to components via props, especially when the data might change or come from an external source. This makes your components more reusable and easier to test. For more on this, check out React Props.
-
State Management in Functional Components:
- You're using React Hooks effectively for state management, which is a good practice. Ensure to keep state logic encapsulated within components where it's most relevant. Sometimes, larger apps benefit from centralized state management using Context API or Redux. Hereโs a guide for managing state in React: State and Lifecycle.
-
Accessibility and Semantic HTML:
- Pay attention to accessibility. Ensure that interactive elements are accessible, use semantic HTML, and make sure that your website is navigable via keyboard. Accessibility is crucial for a wide range of users. Learn more about accessibility in React here: Accessibility in React.
-
Code Consistency and Cleanliness:
- Keep your code clean and consistent. This includes consistent naming conventions, proper indentation, and avoiding unnecessary code or comments. Tools like Prettier or ESLint can help maintain consistency. Check out Prettier for code formatting.
Keep up the excellent work. Every project is a step forward in your development journey. Happy coding and best of luck in your future projects! ๐จโ๐ป๐
Marked as helpful1 -
- @0xabdulkhaliqPosted 9 months ago
Assalamu Alaikum Sister ๐
Congratulations on successfully completing the challenge! ๐
- I have a recommendation regarding your code that I believe will be of great interest to you.
ACCORDION ๐ด :
- You have done a best job in replicating the solution as close to the design, congrats for that.
- One thing that i noticed is the way you implemented the Accordions for FAQ Section. Which is an in-accessible one.
- The best way to go with creating the accordion elements in this challenge would be with the
details
andsummary
elements (or perhaps a combination of buttons and other elements).
- They are already fairly accessible and provided a clean, semantic way to create accordion elements. I see you have used the
div
&p
elements for the accordions, but those are not interactive or accessible by keyboard, so not all users will be able to open the accordions to see the content inside.
- MDN's reference is a great place to start learning about the
details
andsummary
elements if you are interested.
- If you have any questions or need further clarification, you can always check out
my submission
for a newbie challenge (which is archived now) and/or feel free to reach out to me.
.
I hope you find this helpful ๐ Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@RazaAbbas62Posted 9 months agoThanks, bro @0xabdulkhalid for taking the time to check out my code and provide me with those valuable suggestions. I will surely keep them in mind while doing other projects.
Thanks
0
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