For now, I’ve been playing with the Frontity framework to create a series of tutorials for continuing my Headless WordPress category.
What I wanted to achieve is to get comments on a post. And I struggled to find a good way to update the state and add custom data to the source. I could get it following the state and such but I would like to see a more API-like approach.
I’ve tried using the .populate() method but that, if I understand correctly, works per “URL”. So what I could do is fill a custom object “comments” inside of state and relate it to a post ID.
What could be more useful would be to use a method such as populate to add additional data only to that one data object we get from source.
Maybe there is one but I’ve missed it. If there is nothing like that, I would like something like that inside of the v2
I feel like full compatibility with gutenberg is really a must. I’ve run into a lot of weird edge cases when I’ve changed my API source from the frontity test API url to a blog which has newer posts that use Gutenberg for their final output, and the default mars-theme doesn’t quite properly support Gutenberg created content-body HTML markup.
Hey Aslan, thanks a lot for your insights. I’ve been checking and I see that not long ago @SantosGuillamot opened this thread Gutenberg Support. It would be great if you could share there your tests and the problems you have encounter.