Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 5 years ago

Job listings with React, Sass modules & snapshot testing with Jest

Alex Kim•1,325
@alex-kim-dev
A solution to the Job listings with filtering challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  1. 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} ... />
  1. Should every component have a snapshot test? I used react-test-renderer and 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 GitHub

Community 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License