BBob icon indicating copy to clipboard operation
BBob copied to clipboard

Warning: Component: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Open GVALFER opened this issue 2 years ago • 3 comments

Warning: Component: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. at Component (webpack-internal:///(app-client)/./node_modules/@bbob/react/dist/index.js:1076:26) at Parser (webpack-internal:///(app-client)/./src/components/forms/TextEditor/editor/Parser.js:17:11)

After install your library, i get this error.

I am using NextJS.

`import React from "react"; import BBCode from "@bbob/react"; import presetReact from "@bbob/preset-react";

const plugins = [presetReact()];

function Parser({ text }) { return <BBCode plugins={plugins}>{text}</BBCode>; }

export default Parser; `

GVALFER avatar Jul 17 '23 01:07 GVALFER

Thanks for this issues. I think you use latest version of React. But @bbob/react compatible with React starting from 15.0 version where defaultProps is proper way.

I think I can remove defaultProps in next minor release.

JiLiZART avatar Jul 17 '23 14:07 JiLiZART

any news on this one? or suggestions how to suppress?

RiggerJay avatar May 24 '24 01:05 RiggerJay

I think you can ignore warning. Soon will be released migration to TypeScript and this bug will be fixed

JiLiZART avatar May 24 '24 11:05 JiLiZART