Skip to content

Commit 77f1150

Browse files
committed
Enhance documentation for performance, persistence, and state management
- Updated performance.html to include detailed explanations on unnecessary re-renders, selector patterns, and performance tips. - Expanded persistence.html with comprehensive guidance on auto-saving state, session vs local storage, configuration examples, and best practices. - Revamped state-management.html to cover advanced patterns, derived state, optimistic updates, state composition, and best practices for organizing state.
1 parent 56a0d67 commit 77f1150

13 files changed

Lines changed: 4197 additions & 36 deletions

docs-site/api-reference.html

Lines changed: 416 additions & 2 deletions
Large diffs are not rendered by default.

docs-site/assets/css/styles.css

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,133 @@ li {
586586
margin-bottom: 1rem;
587587
}
588588

589+
/* Lead paragraph */
590+
.lead {
591+
font-size: 1.25rem;
592+
color: var(--text-secondary);
593+
margin-bottom: 2rem;
594+
}
595+
596+
/* Flow Diagram */
597+
.flow-diagram {
598+
margin: 2rem 0;
599+
padding: 2rem;
600+
background-color: var(--surface);
601+
border-radius: 0.5rem;
602+
}
603+
604+
.flow-step {
605+
display: flex;
606+
gap: 1.5rem;
607+
margin: 1.5rem 0;
608+
padding: 1.5rem;
609+
background-color: var(--background);
610+
border-radius: 0.5rem;
611+
border: 1px solid var(--border);
612+
}
613+
614+
.flow-step-number {
615+
flex-shrink: 0;
616+
width: 3rem;
617+
height: 3rem;
618+
background: linear-gradient(135deg, var(--primary), var(--primary-light));
619+
color: white;
620+
border-radius: 50%;
621+
display: flex;
622+
align-items: center;
623+
justify-content: center;
624+
font-weight: 700;
625+
font-size: 1.5rem;
626+
box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
627+
}
628+
629+
.flow-step-content {
630+
flex: 1;
631+
}
632+
633+
.flow-step-content h3 {
634+
margin-top: 0;
635+
margin-bottom: 0.5rem;
636+
color: var(--primary);
637+
}
638+
639+
.flow-step-content p {
640+
margin-bottom: 0.5rem;
641+
}
642+
643+
.flow-step-content .code-block {
644+
margin-top: 1rem;
645+
margin-bottom: 0;
646+
}
647+
648+
.flow-step-content .alert {
649+
margin-top: 1rem;
650+
margin-bottom: 0;
651+
}
652+
653+
.flow-arrow {
654+
text-align: center;
655+
font-size: 2rem;
656+
color: var(--primary);
657+
margin: 0.5rem 0;
658+
font-weight: bold;
659+
}
660+
661+
/* Principle Cards */
662+
.principle-cards {
663+
display: grid;
664+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
665+
gap: 2rem;
666+
margin: 2rem 0;
667+
}
668+
669+
.principle-card {
670+
padding: 1.5rem;
671+
border-radius: 0.5rem;
672+
border: 2px solid;
673+
}
674+
675+
.principle-card h3 {
676+
margin-top: 0;
677+
margin-bottom: 1rem;
678+
font-size: 1.25rem;
679+
}
680+
681+
.principle-card ul {
682+
margin: 0;
683+
padding-left: 1.5rem;
684+
}
685+
686+
.principle-card li {
687+
margin-bottom: 0.75rem;
688+
}
689+
690+
.principle-do {
691+
background-color: #d1fae5;
692+
border-color: var(--success);
693+
}
694+
695+
.principle-do h3 {
696+
color: #065f46;
697+
}
698+
699+
.principle-do li {
700+
color: #047857;
701+
}
702+
703+
.principle-dont {
704+
background-color: #fee2e2;
705+
border-color: var(--error);
706+
}
707+
708+
.principle-dont h3 {
709+
color: #991b1b;
710+
}
711+
712+
.principle-dont li {
713+
color: #b91c1c;
714+
}
715+
589716
/* ========================================
590717
Scrollbar
591718
======================================== */
@@ -710,6 +837,20 @@ li {
710837
.stat-value {
711838
font-size: 2rem;
712839
}
840+
841+
.flow-step {
842+
flex-direction: column;
843+
}
844+
845+
.flow-step-number {
846+
width: 2.5rem;
847+
height: 2.5rem;
848+
font-size: 1.25rem;
849+
}
850+
851+
.principle-cards {
852+
grid-template-columns: 1fr;
853+
}
713854
}
714855

715856
@media (max-width: 480px) {

0 commit comments

Comments
 (0)