Giter Site home page Giter Site logo

red-it's People

Contributors

jonathanfunk avatar

Stargazers

 avatar

Watchers

 avatar

red-it's Issues

Redit pt 1 issues

General:

Very good work overall. Make sure you use functional stateless components throughout the app. Make sure to split your code into appropriate files when you can. Each file should do exactly one thing.

Specifics:

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/actions/PostActions.js#L10
Food for thought: it's difficult to test whether an object is empty in JS. So maybe an empty object isn't a good default. I would recommend null. Then you could do something like:

if (action.payload) 
  // Do something

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/HeaderBar/index.js#L9
Be sure to clean up example documentation. You want people to think you wrote this code.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/HeaderBar/index.js#L15
Break this into multiple lines. It's hard to read.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/Post/index.js#L15
Nice use of non-standard characters

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/Post/index.js#L26
Do you need to disable all of these lines?

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/PostToolBar/index.js#L13
Watch your spacing

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/components/Week/index.js#L11
https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/containers/Categories/index.js#L22
Use meaningful variables here. x almost always represents a number, which is misleading. i is generally used for indexes, so that one is fine.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/containers/Categories/index.js#L10
Use a functional stateless component w/ destructuring. Remove console.log.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/containers/CreatePost/index.js#L3
Remove unused code

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/containers/PostList/index.js#L9
Use a functional stateless component w/ destructuring.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/reducers/PostsReducer.js#L14
What happens when two posts have equal votes?

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/reducers/PostsReducer.js#L13
Be careful of naming. SORT_POP is confusing, because pop means something in the context of arrays. Don't worry about the extra characters, just use SORT_POPULARITY.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/reducers/PostsReducer.js#L14
You can also use array destructuring [...arrayName] instead of slice.

https://github.com/jonathanfunk/red-it/blob/master/web.browser/src/store/createStore.js#L7
Nice middleware! I'd recommend moving it to its own file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.