DEV Community

Discussion on: Announcing Frontity 1.0!

r_martinezduque profile image
Reyes Martínez Author

Thanks! These are websites built entirely in React. You can get a similar result using transition libraries with React like react-spring.

However, if you use Frontity, as it uses the WordPress REST API to populate the site, you won’t get any JS code from your WP plugin unless that code is part of a post/page content.

Let me know if you still have any doubts :)

matthijsewoud profile image
⚡️ • Edited on

Thanks for the reply. Let’s say I want a contact form, or something more special (something like activity submissions), I’d have to put that code into Frontity (or the theme?) yeah? I suppose custom made Gutenberg blocks would fit this as well, since they’re rendered inside the post content.

Analytics, if one wants those, would also have to be adapted to be triggered per rest-request.

Thread Thread
orballo profile image
Eduardo Campaña • Edited on

Yes, everything that is not exposed in the REST API and/or requires some kind of logic, will need to be replicated on our end with Frontity. In the case of analytics, we are planning on releasing a plugin as we had in our previous version of the framework.

Regarding Gutenberg blocks, right now, they are rendered in the content as simple HTML code, so what you can do is to use @frontity/html2react and create a processor that will identify that HTML belonging to the block and render on its place the React component of your choice.

We try to make Frontity completely extensible, so if somebody creates a solution for a Gutenberg block, or an analytics library, it can be reused by the community.

I hope this solves your doubts! 😄