Commit 50d5339
Fergus Bisset
fix: remove useRef from ProductCard for full SSR compatibility
- Remove unnecessary useRef that was preventing SSR usage
- Change default seed from Date.now() to 0 for SSR consistency
- Add SSR documentation with seed usage guidelines
- All 58 tests still passing (32 client + 26 SSR)
BREAKING: Vector graphics now default to seed=0 instead of Date.now()
when no seed is provided. Always provide an explicit seed for production.
Fixes: useRef only works in Client Components error in Next.js1 parent 779fca9 commit 50d5339
2 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | 528 | | |
| 529 | + | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | 656 | | |
658 | 657 | | |
659 | 658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
391 | 428 | | |
392 | 429 | | |
393 | 430 | | |
| |||
396 | 433 | | |
397 | 434 | | |
398 | 435 | | |
399 | | - | |
| 436 | + | |
400 | 437 | | |
401 | 438 | | |
402 | 439 | | |
| |||
0 commit comments