I'm working on improving the "progressive enhancement" behaviour for my project. Since I'm using fetcher.Form, my client can submit things even without JavaScript, since it falls back to a plain HTML form until "hydration".
However, I have not been able to figure out how to populate the form with error messages in this scenario (JavaScript disabled). The component retrieves error messages from fetcher.data. At the moment, console.log(fetcher.data) shows it's always undefined on the server render, so it doesn't work and the server responds with a completely blank form.
Is this something that is possible? If so, how? It should be possible technically, since the page makes a full round trip to the server, and "respond with the same page but with errors added to the form" is a classic pure-HTML no-JavaScript thing to do, so it seems like something that would be possible in a framework like Remix, which aims to support these "web fundamentals".
And Remix does do loaders on the server as part of SSR (right?), so why isn't this working for me with actions and fetchers?