jonathanfunk / red-it Goto Github PK
View Code? Open in Web Editor NEWFull-stack web based application.
Full-stack web based application.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.