davidhu2000/react-spinners

How to solve EmotionCssPropInternal unique "key" prop issue

KoushikMVN opened this issue · 2 comments

Hi! i am using GridLoader in next js , but i get a error of Each child in a list should have a unique "key" prop warning

import React from "react";
import { css } from "@emotion/core";
import GridLoader from "react-spinners/GridLoader";
import Proptypes from 'prop-types'
// Can be a string as well. Need to ensure each key-value pair ends with ;
const override = css`
  display: block;
  margin: 150px auto;
  border-color: red;
`;
const PageLoader = Props => {
    return (
        <div className="sweet-loading">
            <GridLoader
                css={override}
                size={20}
                color={"#62842C"}
                loading={Props.loading}
            />
        </div>
    );
};

PageLoader.prototype = {
    loading: Proptypes.bool.isRequired
}

export default PageLoader;

i am using this code to load Gridloader but i face

Warning: Each child in a list should have a unique "key" prop.
    at span
    at EmotionCssPropInternal
    at Loader

this warning, how can i solve it ?

hmm, i just ran npx create-next-app and imported GridLoader, and not seeing the issue. Can you provide more code to help reproduce?

this issue should be resolved since emotion is removed