Templating engine for react.js (gatsby.js)

717 views Asked by At

I am into this react.js and gatsby.js issue since a while. But as a senior symfony developer I wonder if there are options like TWIG even for gatsby sites?

Now I want to create sites with graphQl data and gatsby. Is templating not possible with this new stack?

1

There are 1 answers

0
Bumhan Yu On

React is a JavaScript Library for building user interfaces, according to their website. It simply provides a clever wrapper UI to build component-based building blocks for an app. Once you grab content or/and data from somewhere—e.g. CMS, file system, Graphql DB, etc—you'll have to render them in a format you'd need. You could build a template-like structure via JSX, but I don't think React/Gatsby supports a templating engine like Twig.

If you're looking for a JavaScript-based static site generator, 11ty might be a good alternative, as it supports a whole bunch of templating languages. See this link.