Comprehensive Blaze documentation is available at the Blaze Community Site.
Installation
Blaze is included by default when you create a new Meteor app. To add it to an existing project:Quick Start
Create a Blaze app:Basic Structure
Blaze uses HTML templates with special syntax for dynamic content:Template Helpers and Events
Add behavior to templates with JavaScript:Component-Based Structure
Organize Blaze templates as reusable components:Component Example
- hello.html
- hello.js
Working with Collections
Blaze automatically reacts to data changes:- Template
- JavaScript
Template Lifecycle
Blaze provides lifecycle callbacks for template instances:Template Syntax
Data Context
Control Flow
Template Inclusion
Reactivity
Reactive Variables
Reactive Dictionaries
Subscriptions
Integration with React
- React in Blaze
- Blaze in React
Use React components inside Blaze templates:
Best Practices
Use template instances
Use template instances
Store state on template instances, not global variables:
Clean up subscriptions
Clean up subscriptions
Use
this.subscribe() in onCreated for automatic cleanup:Use autorun for reactive dependencies
Use autorun for reactive dependencies
Wrap reactive computations in
autorun:Limit data in helpers
Limit data in helpers
Use
.limit() and .fields() to reduce data transfer:Common Patterns
Loading States
Forms
Resources
Blaze Guide
Comprehensive guide to Blaze templating
Blaze API
Complete API reference for Blaze
Blaze Tutorial
Step-by-step tutorial for building Blaze apps
Reactive Var
Documentation for ReactiveVar