Idioms and Patterns
Reactive Patterns
Derived State
// Computed with conditional dependencies
const [withEmail, setWithEmail] = createSignal(false);
const [user, setUser] = createSignal({
name: "John Doe",
email: "john.doe@pm.me",
});
const author = createComputed(() => {
if (withEmail()) {
return `${user().name} <${user().email}>`;
}
return user().name;
});Conditional Effects
Resource Loading Pattern
Nested Batching
Advanced Template Features
Nested Components
Last updated