-
Notifications
You must be signed in to change notification settings - Fork 111
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
Using the WordPress REST API #2266
Comments
//lesson |
Lesson Development Checklist
|
Lesson Development Checklist
|
02.Using.the.WP.REST.API.mp4Video ready for review Please follow the Guidelines for reviewing content to review this lesson. |
Tutorial/Lessons Review Checklist
@jonathanbossenger, great tutorial! I have one suggestion: at 10:52, you mention people can leave the In this context, I would have liked to know the differences between these three options at the beginning of the hands-on demo rather than closing with it (at ~16:20). Especially since the next lesson (#2267) only uses the |
There's no real reason as to why or why not, it largely depends on the use case. This specific example code isn't something one would use in the real world (building a form that has more than one way to fetch the data), so I was just pointing it out. What I'm trying to avoid is someone thinking you have to include
So this one is a tricky one. First off, I don't think I'm focusing on the Backbone.js client, it's just the first option being presented. The reason for this is that, at the moment, the section on using the WP REST API only lists the Backbone.js client. With the advent of the block editor, the api-fetch package was added, but it's not referenced in the WP REST API docs, only in the block editor docs. So someone reading the WP REST API docs might wonder why this lesson doesn't reference it. Additionally, the core-data package only works in a React app, so if you're building something outside of React, you'd have to use one of the other options. This means that for this lesson, I have to cover at least the two current options that are available for a React context. That's another reason I include the wrap-up at the end, instead of upfront. The lesson is not prescribing which option should be the default, they're all available, and all have their uses. The other reason that I'm only presenting the three options here, and future lessons only use api-fetch as examples is that including the same 3 options for each of the next lessons makes those lessons that much longer, and I'm also fighting for time. |
I would also add that I would like to do a more in-depth series of lessons around using the WP REST API to build applications in a later learning pathway, but these initial lessons are very much introductory. |
Thanks for the explanation, @jonathanbossenger! It's always interesting to understand the “why”, so I appreciate you taking the time 🤓 |
//publish |
Details
Learning Objectives
Related Resources and Other Notes
Automation Code
//lesson
The text was updated successfully, but these errors were encountered: