Typo in wp-source doc's

I’m struggle to understand how wp-source works, so I re-read the docs, and tried out the example there.

I find a typo: in the example code of the How to use section, the if (data.isCategory) { has no closing bracket }.

Also, the code does not work as it is, if the actions.source.fetch("/category/nature/"); is not within React.useEffect. It would be nice to either change the code, or explain the need of useEffect.

Hi @koli14

Thanks for the heads-up. We are in the process of updating our documentation so we will certainly take the items you point out into account.

Hello @mburridge please make longer explanation for Wp-source with Good number of example,

Thanks.

1 Like

Hi @mehul

Thanks for your comments. We will certainly take them into account while we update the documentation. Adding a good variety examples is one of our priorities.

2 Likes

FYI
We have reviewed and updated the wp-source package documentation page β†’ https://docs.frontity.org/api-reference-1/wordpress-source

Now, there’s a more detailed explanation of the API in its methods and better examples of how to use these methods in a React component (useEffect)

In that page, you can also find links to some videos where Frontity DevRel team talks about the wp-source package

4 Likes

I love the new wp-source docs!! :heart_eyes::heart_eyes:

2 Likes