incode-app's People
incode-app's Issues
Useless iterations
Please avoid iterating the whole list of entities (tasks) to update only one of them.
Binding
https://github.com/EvgenBabenko/incode-app/blob/f/async/src/containers/Auth.jsx#L10
Please take a look at binding strategies in React and their pros/cons.
Take thoughtfully this article https://medium.com/@charpeni/arrow-functions-in-class-properties-might-not-be-as-great-as-we-think-3b3551c440b1
Summary:
The initialization of arrow functions in class properties are transpiled into the constructor.
Arrow functions in class properties won’t be in the prototype and we can’t call them with super.
Arrow functions in class properties are much slower than bound functions, and both are much slower than usual function.
static propTypes
incode-app/src/containers/Auth.jsx
Line 35 in 0fcc475
it can be moved to static propTypes, but be aware of using relevant babel preset (as well as defaultProps).
Redux bindActionCreators
incode-app/src/containers/Auth.jsx
Line 30 in 0fcc475
Consider using redux bindActionCreators https://redux.js.org/api-reference/bindactioncreators
Memoize this one
incode-app/src/containers/Dashboard.jsx
Line 33 in fb46fcb
Consider memoizing this filter result. Look at the samples in the documentation. You'll like it ;)
Backend integration
...
Avoid function declarations inside render function
incode-app/src/components/Controls.jsx
Line 29 in fb46fcb
avoid componentDidUpdate as much as possible
incode-app/src/containers/Dashboard.jsx
Line 21 in fb46fcb
Try to avoid componentDidUpdate as much as possible. Use it only in case you need to do something after EVERY component rerender (DOM has been updated): for example you're using any 3rd-party UI libs like charts, maps or whatever.
There is a recommendation to use it in case you need some actions to perform if props have been changed, but it's also dangerous bc you may come into an infinite loop by occasional using setState
somewhere inside.
Please take a look at getDerivedStateFromProps
approach https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops AND read about it thoughtfully (including warnings and better alternatives).
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.