Git Product home page Git Product logo

evo-ts-bootcamp's People

Contributors

ksaveljev avatar

Watchers

 avatar

Forkers

gerasik

evo-ts-bootcamp's Issues

Bubble Sort Review

  1. NodeJS.Timer is incorrect. Try window.setInterval explicitely. here

  2. You can write just it instead:

state = this.resetState();

// constructor(props: AppProps) {
//     super(props);
//     this.state = this.resetState();
// }
  1. 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());
    }
  1. Button, ControlPanel, Visualization, and so on (where you don't use lifecycle methods and state) components can be Function (Stateless) Component.

  2. event: MouseEvent<HTMLButtonElement> -> event: React.MouseEvent<HTMLButtonElement>
    or better React.MouseEventHandler<HTMLButtonElement> for the function

  3. 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 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.