Submitted about 5 years agoA solution to the Job listings with filtering challenge
Job listings with React, Sass modules & snapshot testing with Jest
@alex-kim-dev

Solution retrospective
- Is it a good approach to pack a number of variables into an object and pass it as a prop to some component in order to reduce the number of props to pass?
<Component data={data} />
// or
<Component prop1={val1} prop2={val2} ... />
- Should every component have a snapshot test? I used
react-test-rendererand noticed that it renders all nested components too. So if I test, for example, a subscribe form and a whole page with it, the form gets rendered in both of these tests.
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Alex Kim's solution.
Join 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