Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Github Search using Typescript React and SCSS

#react#typescript#sass/scss
Francisldn 250

@francisldn

Desktop design screenshot for the GitHub user search app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


SCSS setup

  • As this is my first time using SCSS, setting up the folder structure took a while for me, but once it was set up, it provided a much easier development experience compared to using vanilla CSS. In particular, I would like to highlight a few things as below. 1. Nesting of CSS selectors - SCSS allows for nesting of selectors which allows for easier maintenance and reading 2. Creating variables using @mixin and @functions which provides for reusability 3. Creating CSS group properties such as colors and font which then allows for easy retrieval using map-get function 4. SCSS function such as lighten() enables user to easily change color to lighter shade

Typescript React

  • I have used React in JS before, but this is my first time using Typescript React for development. Given the strongly-typed nature of Typescript, it took a longer development time as I had to figure out how to resolve certain error messages which are specific to Typescript. I had found Typescript intimidating in the past and was put off by the longer time requirement for development, but this experience has helped me appreciate Typescript a bit more and understand ways to deal with Typescript-specific errors. I did encounter an error which I could not resolve and I have posted it on Stackoverflow here. It is a problem regarding using useRef react hook to add cssText. Would highly appreciate it if anyone has any insight into this problem.

Responsive mobile and tablet layout

  • It took me a while to adjust the desktop layout to tablet and mobile. I eventually used position: absolute to organise the layout as required. I have learnt various CSS position properties through the process.

Dark/light mode & localStorage

  • I have learnt how to set dark and light mode using CSS properties and how to store the state in localStorage, using localStorage.getItem() and localStorage.setItem() functions. This allows user to store their viewing mode preference in the local storage and their preference will be persisted for their next visit.

Community feedback

Francisldn 250

@francisldn

Posted

While tackling this challenge, I have encountered an issue which I could not resolve: https://stackoverflow.com/questions/72095723/problem-with-using-useref-to-add-csstext-in-typescript

Would highly appreciate if anyone can share any insight into this issue.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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