-
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]: Problems with Data Loading documentation #861
Comments
Thanks, @amirhhashemi . You raise good points. But I think they need to be tackled separately, Let me break them down so we can start organizing on how to tackle them.
I agree, loading on the server should not be a subsection. For that I'd propose we break it into 2 PRs:
The difference between
I disagree that we should have a mention to Tanstack Query in the official guide of the framework for Data Loading. But I think it would be a great learning resource and perhaps we could even welcome it as a separate guide (within our docs, similar to what Migration from 0.9 is in the Solid-Router).
I believe that would be addressed with adding a section to @LadyBluenotes if you and @amirhhashemi are ok with my suggestions, I'm glad moving labelling this as planned and adding the points above as subtasks of this same issue. |
Thank you @atilafassina for taking a look at this. First, I want to point out that I'm a beginner when it comes to Solid. So please correct me if I'm wrong about something. However, I have a lot of experience with React and its ecosystem. I generally disagree with your suggestions. Here are my thoughts: (some of them in response to your suggestions and some of them more general)
That's my opinion. I respect what you have done (and are doing) with the docs. But I think my vision is different. I've tried to convey my vision through my original PR. I would love to help you with this if we can find a middle ground. I believe a lot of the material in my original PR can be used to tackle the first task (Decoupling server/client data-loading. Putting preload into its own section). There are form submission and I don't know much about single-flight mutations. But if you point me in the right direction (an example, an article somewhere or even a Discord thread) I can figure it out. |
I just noticed the parent section of Data Loading is called "Building your application". So maybe we should mention Tanstack Query. It's a valid option for building applications with SolidStart. Just a thought. |
I see what you're coming from. My initial take was that we should explain how data loading works within the SolidStart context instead of "getting started" chapter about data loading. But you made relevant points and I'm reevaluating my take. You're idea is very compelling (having a "all about data loading" kind of entry - it's a huge undertake though, if you're up for it, I'd love to help you see this through and then I think we can forget about this existing entry, create a Guides section for SolidStart and add both a "Fetching Data" and a "Mutating Data" entries.
Yes and no.
If I remember right, the case for closing that PR wasn't about the content itself, but that we'd like to have this discussion (again, our fault for not replying to the issue earlier). So the content should still be useful.
if you decide to document, I can help you further. But for now, just so I don't leave you hanging: This is an evolution on the mutation system for other frameworks, where every mutation has 2 flights (one for triggering the mutation and another for fetching the revalidated query). Bottom line is: how about we start a new section to document Data Fetching in a Guide for SolidStart and then once we merge the first guide ? If the information proves to be redundant to what we have in the "build your application" section, we can eliminate that one. My one and only request for this would be: try not to go too deep into explaining APIs, instead I'd suggest either adding a callout or a link to suggesting further reading in the Reference. That allows to keep the guide short, strengthens internal linking between the sections - which not only helps SEO, but also our internal search (and the AI feature that we need to bring back) |
Developers coming from React probably would not read the Solid Router docs at all, because in the React ecosystem meta-frameworks come with their router. They might map that mentality to SolidStart and think: SolidStart has its router and Solid Router is like Although Another mentality of people coming from React is that Data Fetching is the responsibility of the meta-framework or an external library like Tanstack Query and Solid should have nothing to do with it. I genuinely think most people coming from React start right off from SolidStart. That's my theory. The point is that they might not internalize it well that We have three options:
You tried to take the first approach with the caveat that you didn't make the relationship very clear. I think that's why I struggled a lot with SolidStart at first. The relationship between SolidStart and Solid Router was not very clear to me. I tried to take the second approach. But I think the third approach is the best and a Guide section would be a great home for that sort of content. I'm absolutely down to write a "Data Fetching" document in a "Guide" section. Then we can decide whether to keep the current Data Loading page. Even then, if you decide that the Guide section is redundant, I'm fine with it. If I need to know anything before starting, please let me know. |
Yes, that's usually it. While we try not to cater for a specific migration/onboarding path, we can't pretend we don't see the fact that most Solid devs are immigrants from React.
Some experienced Solid devs don't realize that, to be honest.
I agree. And more likely the other section will be redundant. I really like where this is going. Besides that, the only thing I'd recommend you to know before getting started is the WRITING.md in the root. |
oh oh oh... can't believe I hadn't thought of it earlier! @OrJDev has written an amazing "all things data loading" on SolidStart @amirhhashemi, I totally recommend that as a source |
I published the first draft of the Data Fetching guide. Would love to know your thoughts @atilafassina @devagrawal09 |
📚 Subject area/topic
Data loading in SolidStart
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/solid-start/building-your-application/data-loading
📋 Description of content that is out-of-date or incorrect
The Data Loading documentation has several areas for improvement:
Structure: The organization is counterintuitive, with only two main sections: "Data loading on the client" and "Data loading always on the server" (oddly, a subsection of the former). This structure doesn't effectively guide users through the various data loading methods.
Comparison: There's a lack of clear comparison between different data loading methods (
createAsync
,createResource
, and Tanstack Query). The documentation doesn't provide guidance on when to use each method.Depth: Some crucial concepts, like the
load
function, are inadequately explained. The documentation doesn't clearly outline when and how to use this function effectively.Examples: The documentation lacks comprehensive examples, particularly:
createResource
withSuspense
andErrorBoundary
createAsync
with actionsThe proposed PR (#857) aims to address these issues.
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: