Coder Social home page Coder Social logo

Comments (4)

gaearon avatar gaearon commented on August 26, 2024 6

Yes, routing is a big research area and it would need at the very least some notion of Server Context. There’s a lot to work out there.

from server-components-demo.

tchak avatar tchak commented on August 26, 2024

I tried to integrate react-router with this demo. I think it should mostly just work with v6-experimental branch (https://github.com/ReactTraining/react-router/releases/tag/v0.0.0-experimental-ffd8c7d0). But I am having issues with webpack build on the server when I start adding dependencies.

from server-components-demo.

tchak avatar tchak commented on August 26, 2024

Hmm, it looks like context/provider API is not available in server components.

from server-components-demo.

philipp-sapronov avatar philipp-sapronov commented on August 26, 2024

@nbouvrette

You can use react-router components without context as well (When the same logic is implemented). Client component has to be returned from Switch / Route server components in order to use server + client routing. For me it works with react-router-dom.
The only parameter required by the server router to create the Match object is the URL, you can pass it to the application from the request.

Here's my example of using server components: 
https://github.com/philipp-sapronov/react-server-components-app

from server-components-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.