简体   繁体   中英

Minified React error #130 when using react-table

I am unable to use react-table(import ReactTable from "react-table") but I am getting the following error in browser console:

Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Please help to resolve this issue.

First of all - for detail resolve you problem, you must add your code, where you using react-table.

When you get minified react error, you get link to get extended error text, so, I see this:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

This means, that one of parameter in react-table expect string or function, but get 'underfined'. In my opinion this error could have happened when you use some variable of type 'any' and set typed parameter with value of this variable.

TS type 'any' allows to store any type of data in variable, but react-table has typed parameters, so when your variable has 'undefined' and you try to set typed variable with this value - you get an error.

One of the way to solve this error is used in rendering pattern to check for existing value of some data variable

{someData && <renderTable...>}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM