Open sternj opened 2 years ago
I have been seeing this as well. Unfortunately all I have been able to come up with is to avoid server-side rendering for the components that give me this error... I am wondering what the underlying cause is too .
I had that issue before, like the error states, you are passing in undefined when your prop expects a string or a function. Check your life cycle and all your variables to see which one get's inside undefined. Prerendering happens before viewing the page so window and document variables are undefined as well.
Also try to use functional components, class components are heavier and it could be causing the pre-render to fail.
I have been attempting to perform server-side rendering of
mui
(formerly material-ui) components and have been getting issues similar to #193. The precise error I am getting isI was wondering whether the state of the art has changed with regards to using server-side rendering. For the sake of example, I am using a modified form of this in this gist
I'm on rails 6.1.4.4 with Ruby 3.0 and reasct-rails 2.6.1.
If it would be helpful I can spin up and post a minimal example.