DEV Community

Discussion on: Announcing Frontity 1.0!

Collapse
 
matthijsewoud profile image
⚡️ • Edited

Looks awesome. I’m going to try this in a bit, for sure. I’ve already implemented a fast navigation using Swup, but I’ve run into a bit of a snag that I think is inherent with this type of thing: Plugins.

Many WordPress plugins require execution of JS, or are otherwise dependent on having a page load in its entirety. Does Frontity do anything to deal with that?

Collapse
 
r_martinezduque profile image
Reyes Martínez

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 :)

Collapse
 
matthijsewoud profile image
⚡️ • Edited

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

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! 😄

Collapse
 
r_martinezduque profile image
Reyes Martínez • Edited

Hey Matthijs! Were you able to try Frontity out? We are continuously looking for feedback to improve the framework and would love to hear any input that you have :)