mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
f47b31626d5bb6dfc51903250ed8882db8dd4e4e
We could in theory actually support this case by throwing a Promise when it's used inside a render. Allowing it to be synchronously unwrapped. However, it's a bit sketchy because we officially only support this in the render's child position or in `use()`. Another alternative could be to actually pass the Promise/Lazy to the callback so that you can reason about it and just return it again or even unwrapping with `use()` - at least for the forEach case maybe. DiffTrain build for commit https://github.com/facebook/react/commit/e41ee9ea70f8998144fdd959ac11fd7a40e4ee20.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%