REST Countries with Pagination using ReactJS, TypeScript, SCSS
Design comparison
Solution retrospective
This is my first API challenge and I learned lots of new stuff while building this project. I implemented things like Search, Pagination, Loading spinner, which I've never done before. If you have any suggestions, I would be happy to hear it
Community feedback
- @fayax555Posted almost 3 years ago
const Controls = (props: Props) => { const { searchValueHandler, searchedValue, searchedResult } = props; return ( <div id="controls" className={classes.controls}> <Search searchValueHandler={searchValueHandler} searchedValue={searchedValue} searchedResult={searchedResult} /> <Filter /> </div> ); };
const Controls = (props: Props) => ( <div id='controls' className={classes.controls}> <Search {...props} /> <Filter /> </div> )
Do you know these two are equivalent?
Also, you can make use of absolute imports with typescript. I add
"baseUrl": "."
to my compilerOptions, and then I would import withimport { countriesDataType } from 'data/country-data-types'
instead ofimport { countriesDataType } from '../../../data/country-data-types'
Btw, great job on the project. It seems you've put a lot of effort on this one.
Marked as helpful1@LukaKobaidzePosted almost 3 years ago@fayax555 I actually never knew about absolute imports, but now i do. Thank you so much for your great feedback and taking time to review the code.
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