-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Content]: Client data loading, confusing section #914
Comments
It might be worth restructuring the data loading docs to look something like this
Structuring like this might alleviate some of the issues brought up by @klequis. On a slightly unrelated note, nothing in the start docs talk about actions and single flight. It's possible to add a separate entry for actions, but if data loading is gonna be split into Also, if Thoughts? |
@devagrawal09 To me this sounds like a good breakdown. I'm not 100% sure how people learn best with the data loading stuff. Feels like so many different approached we could take to help people learn it. |
@brenelz thanks, yeah this is uncharted territory since start might be the only framework that is so unopinionated about data fetching on its own. |
Data Loading always on the server
|
I would put the order
|
This actually makes a lot of sense in terms of educating a newcomer in how to build apps with Start. My concern is - how exactly do we talk about data fetching on the server without first clarifying how to bring data from async sources into UI components? If the server section comes before router and resource, we'd be showing snippets using APIs that haven't been explained yet.
Can you elaborate? server data fetching is only concerned with turning the query functions into |
My suggestion add an additional Section called Data Fetching inside "Concepts" of solid-router docs
Add a separate Data Fetching section inside Building your application of solid start docs
with each of the docs pages linking to the other page. |
"the strategies to avoid waterfalls depends on the loading strategy/apis being used" |
Point taken
I'm confused - you're saying that the data fetching docs in solid-router should have these three things? Or are the three things stuff that goes in the start docs, and the solid-router concepts addition is completely separate? |
Data fetching docs in solid-router should have these three things -> check. |
Why would solid router docs show how to fetch data using not-solid-router? |
You are right.
|
📚 Subject area/topic
Router
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/solid-start/building-your-application/data-loading#data-loading-on-the-client
📋 Description of content that is out-of-date or incorrect
I'm not sure I'm right here but I find this section confusing. It seem to transition from fetching data with
createResource
to fetching data using router features/APIcache
andcreateAsync
, but the transition point isn't clear.I think these two sentences could be combined, they seem to be saying the same thing with different words.
createAsync
andcache
.Finally, since the 'caveats' section mention both
preload
and 'createResource' it I would assume it applies to both examples. However, "With this method" leads me to think they apply to the last example.I would love to dig into this a do a pull request but don't have time at the moment so just putting down my thoughts. I'm happy to come back to it in a week or two if you think my points are valid.
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: