As it is mentioned in the docs
The previous way of using an export looked like this:
exportComponentAsJPEG(node, fileName, type, backgroundColor, options)
- The new way: pass node & an optional object with only the fields you need.
- backgroundColor is no longer accepted in this main object, but is accepted in the "html2CanvasOptions" object, which is passed directly to html2canvas
if you say it've worked before with backgorundColor equals to null you should call it this way
exportComponentAsPNG(node, { html2CanvasOptions: {backgroundColor: null} })
you can also take look at its implementation src-code
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…