Problems in a sample project #25
Replies: 3 comments
-
Hi @ericdmachado! I created a PR for your example repo at ericdmachado/react-server-test#1 1 - Most likely your issue about 2 - You can't import or lazy load server components into client components, these server components become client components. You can pass server components to client components as component props. This is not an issue, just how client and server components work in React, you can find much more information on this topic in the Next.js documentation at https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#unsupported-pattern-importing-server-components-into-client-components 3 - Docker issue was about incorrect TTY detection. 4 - As I mentioned above at the first topic, Thanks for creating a test project! Any new use case provides great value and I hope the initial issues doesn't scared you away from this project! |
Beta Was this translation helpful? Give feedback.
-
Good news @ericdmachado, it seems I was able to get rid of the |
Beta Was this translation helpful? Give feedback.
-
That's awesome @lazarv, I tested it again here with the update from your PR and also added some things locally for testing and everything worked out really well. I'm going to add react-server to parts of my application and I intend to update a little project I built in Vue (https://planningpoker.gereon.com.br/) it's going to be great! |
Beta Was this translation helpful? Give feedback.
-
I created a small project to test some react-server features that I will use in my project. Here is the link to my test repository (https://github.com/ericdmachado/react-server-test) and my considerations:
1 - When using vite.config, I had a problem running the server on a different port (I intend to use environments vars). The configuration file is attached as _vite.config.js.
2 - Inside a component that uses "use client", I am trying to load a server component with the generated html, but I get an error about using async await in client components.
3 - Even without these components, using only the index with a hello world. I had problems building the project inside a Docker container (docker files and Docker compose together in the repository).
4 - I had problems using aliases to facilitate my imports in the project and avoid using relative paths. Ex.: ../../providers.
Please let me know if I used it wrong!
Thank you for your attention.
Beta Was this translation helpful? Give feedback.
All reactions