Preload data before I visit a route
Unanswered
sa'd posted this in #help-forum
sa'dOP
I'm trying to populate a route's page.tsx with some data, that I get through my route handler, which requests it from
drizzle. I use useEffect to call my route handler, and set the appropriate hook, and run the map function to populate that data. But my issue is that it takes like 2 seconds before I see the data, upon visting the route. I need it to be instant. Any suggestions would be welcomed since I'm new to the new next 148 Replies
@sa'd I'm trying to populate a route's page.tsx with some data, that I get through my route handler, which requests it from `drizzle`. I use `useEffect` to call my route handler, and set the appropriate hook, and run the `map` function to populate that data. But my issue is that it takes like 2 seconds before I see the data, upon visting the route. I need it to be instant. Any suggestions would be welcomed since I'm new to the new next 14
sa'dOP
The table gets filled up after like 2 seconds, upon visting
/inventoryAll of this part of
(app)These are all the routes that you can navigae to, using the sidebar
This is the
/inventoryI'm calling the route handler in this
page.tsx, inside a useEffect hook