React-table: Error on useAsyncDebounce

Created on 30 Mar 2020  路  3Comments  路  Source: tannerlinsley/react-table

When attempting to debounce a serverside fetch using useAsyncDebounce, I get the following error in browser:

Screen Shot 2020-03-30 at 20 32 54

Is there a missing babel dependency perhaps?

Cheers

Most helpful comment

Configuring Babel is the right clean way, i guess. But for me this also works for now:

App.tsx:

import 'regenerator-runtime/runtime';
import React from 'react';
...

See https://flaviocopes.com/parcel-regeneratorruntime-not-defined/ and this for Webpack configuration hints: https://www.jhipster.tech/tips/028_tip_ie_support.html

All 3 comments

Looks like you'll need to be using Babel and @babel/preset-env to transpile React Table into your app. If you are excluding the regeneratorRuntime by accident, I would look for something related to your babel presets. Unfortunately, I don't have much more info on this other than to make sure your babel setup is up to date and solid.

Same here using NextJs Server-side rendering.
Simple table sample with controlled pagination with debounce causing this error.
How to fix this?

https://nextjs.org/docs/advanced-features/customizing-babel-config
Tried to use the external config.

The next/babel presets includes:

preset-env
preset-react
preset-typescript
plugin-proposal-class-properties
plugin-proposal-object-rest-spread
plugin-transform-runtime
styled-jsx

But the issue is still happening.

Configuring Babel is the right clean way, i guess. But for me this also works for now:

App.tsx:

import 'regenerator-runtime/runtime';
import React from 'react';
...

See https://flaviocopes.com/parcel-regeneratorruntime-not-defined/ and this for Webpack configuration hints: https://www.jhipster.tech/tips/028_tip_ie_support.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Codar97 picture Codar97  路  17Comments

larrybotha picture larrybotha  路  20Comments

visarts picture visarts  路  36Comments

vaidsu picture vaidsu  路  29Comments

ivanov-v picture ivanov-v  路  16Comments