Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new section on lifecycle of the block. #68961

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dhruvikpatel18
Copy link
Contributor

Closes #56276

What?

Adds a new "Lifecycle of a block" section to the "Fundamentals of Block Development" documentation to explain the different phases and transformations a block goes through.

Why?

Developers new to block development often struggle to understand:

  • How blocks transition through different phases
  • When and how blocks transform between different formats
  • Best practices for handling lifecycle events
  • The relationship between edit, save, and render phases

This documentation provides a clear overview of the block lifecycle to help developers better understand these concepts.

How?

Added a new markdown file docs/getting-started/fundamentals/lifecycle-of-block.md that:

  • Details the five main phases of a block's lifecycle
  • Explains block format transformations
  • Provides code examples for each lifecycle phase
  • Includes best practices for handling lifecycle events

Updated the main README.md to include a link to the new section.

@dhruvikpatel18 dhruvikpatel18 marked this pull request as ready for review January 31, 2025 04:35
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhruvikpatel18 <[email protected]>
Co-authored-by: juanmaguitar <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting Started > Fundamentals of Block Development > Lifecycle of the block
2 participants