Comments (4)
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.
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.
Hmm, it looks like context/provider API is not available in server components.
from server-components-demo.
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)
- suggestion : Add Postgres Docker installation in README.md HOT 1
- Using react-fetch on client HOT 1
- Could not find webpack build output HOT 7
- useServerResponse: Infinite render when deactivating cache HOT 1
- Suggestion: Stale While Revalidate cache management HOT 1
- Webpack 5 Support HOT 1
- Webpack isServer:true HOT 1
- Suggestion: renderReactTree performance improvement
- How does react decide to rerender search result? HOT 3
- React-native support HOT 2
- No Clientx.main.js after build HOT 1
- Element type is invalid
- SyntaxError: Cannot use import statement outside a module
- Support for esbuild
- Can't use destructuring assignment in server code
- Integrate SSR HOT 1
- Demo
- :wave: I'm a robot checking the state of this pull request to save the human reviewers time. I noticed this PR added or modififed the data files under `_data/projects/` so I had a look at what's changed.
- This PR regenerates the stats for all repositories that use a single label in a single GitHub repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server-components-demo.