Commit 8c50236
Document Redux shared store caveat with async: true
Added comprehensive documentation explaining why Redux shared stores
with inline component registration require defer: true instead of
async: true.
Changes:
- docs/streaming: Added "Important: Redux Shared Store Caveat" section
- docs/redux-store-api: Added IMPORTANT callout about script loading
- Explains the root cause: async scripts execute before inline scripts
- Provides 3 solutions: use defer, move registration to bundle, or use Pro
Root cause analysis:
With async: true, the bundle executes as soon as it downloads, which
can be before inline <script> tags in the HTML that register components.
This causes "Could not find component registered with name" errors.
With defer: true, scripts wait for HTML parsing to complete, ensuring
inline registration scripts run before the bundle attempts hydration.
React on Rails Pro's getOrWaitForStore can handle async loading by
waiting for registration to complete.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent ca8c985 commit 8c50236
File tree
2 files changed
+23
-0
lines changed- docs
- api-reference
- building-features
2 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
| |||
0 commit comments