Error: Objects are not valid as a React child
kirti18patel opened this issue · 1 comments
kirti18patel commented
When I load painterro, I am getting runtime error indicating "Objects are not valid as a React child". When close this error it is working but encountering error first. Please share possible solution.
I am using
"painterro": "^1.2.70",
My editor component:
import Painterro from 'painterro'
export default function Editor (src) {
var ptro = Painterro({})
return (
<div>
{
ptro.show(src)}</div>
);
};
Code for calling:
import dynamic from 'next/dynamic'
const DynamicComponentWithNoSSR = dynamic(
() => import("../../components/editor"),
{ssr : false}
)
const ProductList = withRouter((props) => {
return(
<DynamicComponentWithNoSSR src={props.src}></DynamicComponentWithNoSSR>
)}
ivictbor commented
Hi @kirti18patel ,
Please follow minimal working Painterro in react demo
I've just wrote it for you