weather_adjutant's People
weather_adjutant's Issues
5
weather_adjutant/src/components/SingleDayWeather.js
Lines 3 to 4 in 8125ae8
очень длинные данные, лучше вынести в отдельный файл и заимпортить
2
weather_adjutant/src/reducers/RootReducer.js
Lines 4 to 14 in 8125ae8
дефолтный стейт лучше вынести в отдельную переменную
const INIT_STATE = {data: [], status: ''};
export function rootReducer (state = INIT_STATE , action) {
switch(action.type) {
case FETCH_WEATHER:
return {data: [action.payload], status: 'ok'}
case FETCH_ERROR:
return {...state, status: 'error'}
default:
return state
}
}
1
Line 4 in 8125ae8
index.css лучше пихать уже после все остальных импортов
типа разделять js и css импорты
7
очень длинно, я даже не стал смотреть,
разбей на подфунции, заюзай методы массивов вместо циклов
4
Зачем тут фрагмент? оно и так в одном дом элементе
3
тут лучше заюзать асинхронную функцию и
https://developer.mozilla.org/ru/docs/Web/API/Fetch_API/Using_Fetch
будет раза в два меньше кода
https://gist.github.com/msmfsd/fca50ab095b795eb39739e8c4357a808
6
тут фрагмент ненужен
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.