Loading multiple components on a single page. #1553
Unanswered
jringeisen
asked this question in
Help (React)
Replies: 1 comment
-
I solved my problem by simply using axios when each component is loaded onto the page. It triggers a post request, returns a json response with some data, and displays it. I guess I'm wondering if this is the correct way to do things with Inertia? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I couldn't seem to find an answer to this question and I'm not 100% on how to go about this. I currently have a situation where when loading a page the request takes about 20 seconds. I'm using OpenAI's API and I'm handling multiple prompts in a single request, so it takes a bit to process. To improve the UI, I want to split the page into 3 components and have each component load its piece of data. So when the page loads, there should be three requests running (one for each component). While they're loading a spinner displays and when each one get's its data the data is displayed. This is super easy to achieve with just plain ole react and Laravel, but how do I achieve this the Inertia way? Am I missing something? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions