Comments (5)
Is it possible to add renderToReadableStream
to Node.js package?
from react.
@MeenuyD I tried your snippet and it doesn't work either
from react.
Hello I think this is not the bug in React-dom I have checked both the official documentation repository there are mentions about the reanderToReadableStream there you wrote an incorrect code here is the updated code.
import ReactDOMServer from 'react-dom/server;
const { renderToString, renderToReadableStream } = ReactDOMServer;
console.log({ renderToString, renderToReadableStream });
because the error says that it is the syntax error Named export 'renderToReadableStream' not found. The requested module 'react-dom/server' is a CommonJS module, which may not support all module.exports as named exports.
from react.
Node.js exposes WebStream to global since 18.+, but react-dom/server
does not export renderToReadableStream without checking if it present.
from react.
Ditto - often when building and testing things locally the runtime is node, while the final deploy target is edge (cloudflare, etc). Because renderToReadableStream
is not exposed on the node build, we have to do a dance to make everything work.
Any particular reason to not include renderToReadableStream
on the node build? Made sense when node did not have support for web streams, but it has for a while now, and now that everybody seems to be converging on the web streams standard perhaps it makes more sense to include?
from react.
Related Issues (20)
- Bug: useRef on react-test-renderer wont work HOT 1
- Bug: NOTHING BIG
- Bug: putting promise into JSX will cause hydration issue HOT 11
- Bug: Pressing `enter` on an input to submit the form submits the first button instead of the form itself (With Actions) HOT 5
- [DevTools Bug] Cannot remove node "434" because no matching node was found in the Store. HOT 1
- Bug: 40k modules in npm, fix that. PLEASE!!!!!
- [DevTools Bug]: Recent version broke modal in chrome browser HOT 1
- Bug: Uncaught TypeError: Cannot read properties of null (reading 'useContext') when importing react-router-dom HOT 25
- [DevTools Bug]: Console error on Firefox "moz-extension:*" pages
- [DevTools Bug]: Excessive CPU Usage HOT 4
- Feature: useEffectEvent should be useCallback without dependency array HOT 9
- Bug: Input icon prop is not working HOT 2
- Bug: React Context API Not Updating Correctly with Concurrent Mode HOT 2
- Reading order/sequence is not in understandable manner on Data card. HOT 1
- Feature: Release ReactCurrentDispatcher as a consumable API to be used in conjunction with useExternalSyncStore HOT 2
- Bug: dynamic import component which use useMemo internaly failed HOT 2
- Bug: Add LinkedIn Tab to website HOT 9
- Bug: HTML element <col> cannot be used as a direct descendant of <table> HOT 1
- Bug: Error in the react web page. (Go full-stack with a framework) HOT 17
- [DevTools Bug] Cannot add node "295" because a node with that id is already in the Store. HOT 1
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 react.