static job listings using react and css - any tips welcome
Design comparison
Solution retrospective
any tips for improvement?
Community feedback
- @fayax555Posted over 2 years ago
Take a look at CSS modules. It creates local CSS instead of global. With this approach, conventions like
BEM
become unnecessary.To use it with React, change the file name to
someComponent.module.css.
and import it in your files like `import styles from './someComponent.module.css'.And use it in your classname.
<section className={styles.filterbox}>
.If you have any more questions reply to this comment.
Marked as helpful1@nogyuuuPosted over 2 years ago@fayax555 thank you so much! Your comment is VERY helpful
1@fayax555Posted over 2 years ago@nogyuuu You're welcome.
I notice you're using class-based components in React. It's a bit outdated. React now encourage to use functional components with hooks.
If you look at the new React documentation website, they use hooks rather than classes.
Also, why did you use
fetch
for a local file which you can import directly? Is it for practice?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