r/reviewmycode • • Jun 21 '17

Javascript [Javascript] - Online Store

Recently, I was given an interview assignment to create an online shopping store. I decided to build the store in React/Redux. The specifications were easy as they are basic functionalities. I didn't hear back so I was wondering what was wrong with my code.

Since it was a small project, I structured my code in Rails project directory.

https://github.com/lunzhang/store

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/violent-guitar Aug 23 '17

3. For-loops might have better performance for big data sets but performance is not a problem if you're handling an online store. You'll never have to deal with those amounts of data because that will not be a good user experience. You will for example implement pagination. That's why code readability > performance in this case.

Any guidelines are good as long as you are consistent (not any, but you get my point). Airbnb, google, standard. Whatever. It doesn't really matter. Try to write as much ES6 as possible I'd say, it is the future.

My tip for advancing your JS skills would be to get more involved in the great open source community on GitHub, for example. You could find a React component and contribute in form of issues, PRs or even write your own component. I do that and I've learned so much from it, it's also a nice feeling to co-operate with other coders.

Good luck!