Recently I asked a question about server-side pagination in React, but it was closed as "needs debugging details."
You told us:
Even though the backend returns totalPages = 10, my pagination component renders extra empty pages (11, 12, …30...).
But you did not show anything to do with "my pagination component"; you showed us some code that retrieves data and calls SetBooks and SetTotalPages. You told us "I return the following data:" in describing that code; but we can't see what data was actually returned. We can't even see how it's structured. And there is no way we can know what pagination component you are using; so how are we supposed to know whether the data you give it is correct, or whether the component has correct code? We don't even know whether that is a library or something you wrote yourself, etc. So how can we possibly know whether this SetBooks and SetTotalPages can actually be expected to put the right books on each page?
The problem is that I tried to describe my code and the issue, but I don’t fully understand what is missing.
There is so much missing that it can't be explained in a simple comment.
Please read How to create a Minimal, Reproducible Example to understand on a basic level what is necessary for "help me fix the problem with my code" questions.
Because the question is closed, I can’t see the answer that was there anymore.
This is untrue. The answer was separately deleted as "plagiarism". This commonly occurs for AI (LLM)-generated answers; while I'm not a moderator, and while we do not (by policy) discuss our reasons for suspicion, it looks to me very likely that this is what happened here. At any rate, the answer that you got made many complete guesses about things that you didn't actually tell us. This means that the Q&A could not have been helpful to other people. It's very important to understand that the questions and answers here are for everyone, not just the person who asks.
I also don’t understand how I'm supposed to ask questions in such situations. It doesn’t feel like this site is welcoming to people.... I needed to go back to the answer....
When a question is closed, you are expected to fix the problem with the question, so that it can be reopened.
And in general, you are expected to understand that questions here are not about making it possible for you to finish your work. They are about learning something.
We want people to feel welcome. Unfortunately, the people who own the servers have a completely different and wrong idea about what the site actually is. So we cannot clearly communicate everything up front about the kind of community we have.
Not everyone can feel welcome in every community, because not every community can serve everyone. If you feel that what we provide is not useful to you, that is unfortunate, but we cannot change how we work.
Stack Overflow is not a support forum. It does not actually matter to us what you "need"; what matters is that questions meet our expectations and help with advancing the goal of the site. See also: What are the essential things to know before trying to use Stack Overflow?
We are happy to take questions that are "easy" or which are most relevant to people who are "just starting out". However, they have to be asked properly — we don't compromise on that. We don't care who asked it — we only care how it's asked. And the questions that are useful and meet the standards have mostly all been asked a long time ago. The best way to use Stack Overflow is to search the existing questions.