evo-ts-bootcamp's People
Forkers
gerasikevo-ts-bootcamp's Issues
Bubble Sort Review
-
NodeJS.Timer
is incorrect. Trywindow.setInterval
explicitely. here -
You can write just it instead:
state = this.resetState();
// constructor(props: AppProps) {
// super(props);
// this.state = this.resetState();
// }
- Do not bind it here, because you create new functions every render.
// resetSortingFn={this.resetSorting.bind(this)}
// startSortingFn={this.startSorting.bind(this)}
// pauseSortingFn={this.pauseSorting.bind(this)}
Bind in constructor once:
constructor(props: AppProps) {
super(props);
this.resetSortingFn = this.resetSorting.bind(this);
}
Or use arrow functions for methods (don't need binding anywhere):
private resetSorting = (): void => {
this.pauseSorting();
this.setState(this.resetState());
}
-
Button, ControlPanel, Visualization, and so on (where you don't use lifecycle methods and state) components can be Function (Stateless) Component.
-
event: MouseEvent<HTMLButtonElement>
->event: React.MouseEvent<HTMLButtonElement>
or betterReact.MouseEventHandler<HTMLButtonElement>
for the function -
I would say it's really unreadable. If it's a swap, there is a way to do it much clearer...
numbers[i] ^= numbers[i+1];
numbers[i+1] ^= numbers[i];
numbers[i] ^= numbers[i+1];
CSS Homework Review
Продублирую фидбэк, что писал тебе в личку
Привет, классная галлерея получилась.
Вот тебе пару советов :)
- При загрузке картинок есть видимая задержка. Предлагаю тебе добавить анимацию загрузки (например спиннер).
- В момент появления картинок они у тебя начинают хаотично появляться на странице и потом только встают на свои места. Я бы тебе предложил попробовать показывать картинки только в тот момент, когда их размер уже известен. Кстати сам момент появления картинки тоже можно анимировать :)
- У тебя расчет ширины и высоты картинки происходит внутри styled-components. Из-за того что у каждой картинки свои уникальные ширина и высота, styled-components будет генерировать новый класс и css для каждой картинки. - Такие расчеты лучше тогда перенести в inline styles.
- Можно было бы сделать инфинит скролл или другого рода пагинацию, чтобы можно было продолжать смотреть картинки.
- Я заметил, что ты захардкодил API key, и он теперь в публичном доступе. Так лучше не стоит делать, потому что у тебя могут украсть ключ и наделать плохих дел https://stackoverflow.com/questions/48699820/how-do-i-hide-api-key-in-create-react-app
- Можно было бы уже и не тащить весь semantic ui для формы поиска :) Переверстай с использованием styled-components для практики
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.