GithubHelp home page GithubHelp logo

react-colors's Introduction

React Colors Project

  • A clone of websites like Flat UI Colors and Material UI Colors.
  • One of the projects for my Modern React Bootcamp course.
  • Each video has its own corresponding commit that you can follow along with.

image image

image image

react-colors's People

Contributors

colt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-colors's Issues

White lines appearing between color boxes, after adding a palette

This issue appears after completing lesson 213, but only under specific circumstances. The color boxes display correctly when the app initially loads - but once a new Palette is added white lines appear between color boxes in all contexts I can find:
Screen Shot 2021-04-23 at 10 08 42 AM
Screen Shot 2021-04-23 at 10 08 56 AM
Screen Shot 2021-04-23 at 10 09 08 AM

This issue seems particular to two circumstances:

  • Running with React.StrictMode (which is the current default with CRA), and
  • The following dependencies:
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.6",
    "@testing-library/react": "^11.2.2",
    "@testing-library/user-event": "^12.6.0",
    "react": "^17.0.1",
    "react-color": "^2.19.3",
    "react-dom": "^17.0.1",
    "react-material-ui-form-validator": "^2.1.4",
    "react-scripts": "4.0.1",
    "web-vitals": "^0.2.4",
    "@material-ui/core": "^4.11.3",
    "@material-ui/icons": "^4.11.2",
    "@material-ui/styles": "^4.11.3",
    "chroma-js": "^2.1.0",
    "rc-slider": "^9.7.1",
    "react-copy-to-clipboard": "^5.0.3",
    "react-router-dom": "^5.2.0"
  }

Note: If you pull the version stored here, and run npm install, then you will not see the issue, owing to the frozen dependency versions in the repo. You may encounter this issue if you work through the exercises.

If you are coming to this finding you are experiencing this issue, a workaround is to simply remove the <React.StrictMode> tags from index.js

addRandomColor makes infinite loop in some circumstances

There is an issue with "addRandomColor" method inside NewPaletteForm.js.

Required conditions:

  1. User deleted all palettes but first one ("Material UI Colors"), which has only 19 colors or less;
  2. User is adding colors to new palette with "random color" button only.

This will lead to situation, when there is no any unique color left (we need at least 20 unique colors to fill whole palette using "random color" button), "isDuplicateColor" will be truthful forever, while loop will run infinitely.

To fix that we need to store somewhere at least 20 unique colors at any point of time, even when there will be less than 20 colors in user's palettes, so those colors would always be available for "addRandomColor" method.

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.