Building JSX/React Components

I need to build several websites in Gatsby, is there any workflow you could suggest to make React / JSX components in Pinegrow that you know of?

Or at least handoff for conversion to react components then integration into Gatsby site.

**Opinions about using a framework like Gatsby vs Vanilla HTML/CSS welcomed - I’m still considering it.

Just build your website as you normally would. This is more than enough to convert to React as long as you’ve built everything in a modular way. It’s a good headstart if the HTML and styling has already been done. Particularly if you’re using a utility-first library like Tailwind then all that needs to be done is to take the HTML a plop it into a function.

Right now there’s no plugin for Pinegrow + React but I know @Akayy is working on something for Vue. I’m interested to know how this pans out and whether the same can be done for React.

Personally I’d suggest Next over Gatsby as they’ve been making incredible strides recently and I feel Gatsby has really fallen behind. If static HTML/CSS website is sufficient for your needs then why not build your site completely in Pinegrow? What’s the key driver to go to Gatsby?

2 Likes

Thanks for the response. We’re building headless ecommerce stores and have chosen gatsby over nextjs because gatsby does seem to perform better for the static pages. Page loading speed is critical.

As the site is content managed, gatsby pulls updated content on build and renders it out as static files, my understanding is that nextjs now has this as a new feature but this was always what gatsby did best.

All that said, if it’s a real pain to develop and manage, I will just use static html/css/js in pinegrow!

2 Likes

Gatsby or Next does seem like a better option for what you want to do to be honest which takes your support a little outside of Pinegrow however you’ll need to build all your templates in static HTML anyway so you may as well do that in Pinegrow and migrate to Gatsby when you’re happy with them which shouldn’t take long (I think Tailwind could really speed that up too).

Another option is to use Jekyll which, again Pinegrow does not support directly but I’ve built a few JAMStacks using Pinegrow + Jekyll.