Coder Social home page Coder Social logo

react-labeling-tool's Introduction

Waving

Hits

BE Devloper, also interested in DevOps!

안녕하세요, 항상 새로운 것에 도전하는 백엔드 엔지니어 송민지입니다!

SKILLS

Langs and frameworks
java spring mysql
javascript vuedotjs python django

INTERESTS

java spring mysql javascript vuedotjs python django python

INFRA/TOOLS

linux

git github aws colab
vscode eclipse intellij pycharm slack notion

Top Langs ssMinji's GitHub stats

react-labeling-tool's People

Contributors

ssminji avatar

Watchers

 avatar  avatar

react-labeling-tool's Issues

State is being changed multiple time unnecesarily

AS-IS

  • When converting .jpg/.png to URL for file array, state update is being done inside map function.
  • Thus, state is being updated as length of file array
  • This will cause unnecessary re-rendering cost.
handleChange(e) {
        let files = e.target.files;
        let fileArr = Array.prototype.slice.call(files);
        let upload_files = []

        fileArr.forEach((f) => {
            let reader = new FileReader();
            reader.onload = (e) => {
                let dataURL = e.target.result;
                upload_files.push(dataURL);
                this.setState({
                    isClicked: true,
                    files: upload_files
                })
            };
            reader.readAsDataURL(f);
        })
    }

TO-BE

  • Async/await for converting process.(Use Promise.all)
  • after converting process is done, update state just once with complete file array

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.