zero-to-mastery / CSS_Grid_LearnGame

This will be a game to learn CSS Grid in a Game Mode Style, to make learning more fun!
https://zero-to-mastery.github.io/CSS_Grid_LearnGame/
MIT License
21 stars 37 forks source link

Would you guys be open to refactoring? #17

Closed thetaungg closed 4 years ago

thetaungg commented 4 years ago
    I see a lot code repetitions and props tunnelings. They just add more complexity as the project gets bigger.
      So, if it's okay with all of you, I want to refactor the code using Redux as state manager. And I want to refactor css as well, for the sake of responsive design, I'd like to use rem instead of pixels. And I think if we start using SASS right now, when we write media queries, it'll make them be easier. And finally, I want to restructure the code to be make it more simple and readable.
april9288 commented 4 years ago

Thanks for the contribution! I truly appreciate it as a main contributor of this open source project. This project really helped me get a job as a software engineer during the interview sessions. Please go ahead refactor anything that you want. It's all yours. Here's my suggestions.

  1. React Hooks instead of using Redux.
  2. Styled-components instead of CSS (In terms of scalability, you might consider to use styled-components. You can look it up why it's more recommended. One of the issues with CSS is it can mess up the global scope.)
thetaungg commented 4 years ago
I got a job because of this community too.

But on the topic at hand, I already refactored almost everything. I used Redux not Hooks because Hooks are for replacing class components. But if you're talking about useReducer hook, I think of it as poor man's Redux. (Context API is the one that you can replace Redux)

Styled-components might confuse beginners , so, I plan on using scss with BEM syntax and nesting. So, we don't have to worry about global name space problem.

So, I'll close this issue now