You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a React app.
I'd like to fill tables with fake data the first time I start the app and open in browser.
I tried to do it with on('ready'), but every time I refresh the page, the ready is triggered and the tables are filled again.
Is there any way to detect if no table exist before, and if it's the first time the db is created, then populate it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on a React app.
I'd like to fill tables with fake data the first time I start the app and open in browser.
I tried to do it with
on('ready')
, but every time I refresh the page, theready
is triggered and the tables are filled again.Is there any way to detect if no table exist before, and if it's the first time the db is created, then populate it?
Beta Was this translation helpful? Give feedback.
All reactions