M
M
MRcracker2019-11-13 10:22:58
CMS
MRcracker, 2019-11-13 10:22:58

What are the benefits of linking a wordpress site with react?

I found a few tutorials on how to create a wordpress site template using react and a few tutorials on how to add gatsby to a project.
Tell me what are the benefits for a site on wordpress or any cms it gives? Do I understand correctly that in this case the entire site will not be mpa, but spa, which will allow it to load instantly, but in this case we will disable all wordpress functionality and use it with api just as a console for adding information to the project?
Did I understand correctly that in this case I will need to connect the noSql database or can I also connect everything with mysql?
And also, did I understand correctly that gatsby is a static site generator and when using it everything will work quickly, because an html file will be given on the client, but in this case I will not be able to use php and wordpress functions, for example, comments on the page?
Thank you all for your replies))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Ganev, 2019-12-12
@MRcracker

Firstly, Gatsby is an SSG, it generates static sites, and it can also generate PWA (Gatsby himself, by the way, positions himself as a PWA generator in this way). This is not a SPA.
You understood correctly about WordPress - it can be used with Gatsby as a CMS. At the same time, WordPress will not have anything to do with the logic of the site itself, it will simply be the interface for working with content. In general, there are many CMS aimed specifically at working with static site generators, here is a good list: https://headlesscms.org/
For databases. Inside Gatsby, GraphiQL is built in to work with data, it works out of the box. At the same time, anything can be sources of information, it can be internal files (it is popular to use markdown files for blog posts, but in general you can use json or csv at least), and any API (the same wordpress).
At the expense of the speed of work - this is, in fact, a complex issue. But yes, Gatsby is usually noticeably faster, and the point is not only that in the end the user gets a static site, but also in the optimization tools built into Gatsby, for example, there are very cool tools for optimizing the display of images.
On account of the comments. You can use services for comments, there is a pop https://disqus.com/ or there is an open source platform for commentshttps://commento.io/ .
In general, I often see that WordPress sites still use the same discus.

P
Pavel Didenko, 2019-11-13
@Dasslier

It gives extra troubles and there will not be much profit. The cost of a commercial site will grow very much, and there will be little benefit. Kill it and don't bother

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question