JiLiZART / BBob

⚡️Blazing fast js bbcode parser, that transforms and parses bbcode to AST and transform it to HTML, React, Vue with plugin support in pure javascript, no dependencies
https://codepen.io/JiLiZART/full/vzMvpd
MIT License
167 stars 19 forks source link

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

Closed GVALFER closed 3 months ago

GVALFER commented 1 year ago

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 {text}; }

export default Parser; `

JiLiZART commented 1 year ago

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.

RiggerJay commented 6 months ago

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

JiLiZART commented 6 months ago

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