A
A
ADA M2019-01-14 15:59:08
Search Engine Optimization
ADA M, 2019-01-14 15:59:08

Symfony + React + SSR + SEO?

I work as a PHP developer (mainly on Symfony). I decided to look towards learning the frontend, namely React.js. And then mobile development (React Native or some native language).
There were many questions, advise how to be.
1) As I know, SPA applications have SEO problems due to js scripts. At the moment, as I understand it, the only free and correct approach is to render content on a server. But this greatly complicates development. Is it worth using SSR at all, or is it possible to get good SEO without it in 2019?
2) Heard a lot of good and bad things about React Native. So, is it worth studying at all? Is it possible to develop simple mobile applications on it (eg: for news workers, restaurants, etc. - simple applications, with simple APIs)?
3) Is it worth it to focus on the study of SPA sites, what do you think? As I understand it, in the future there will be only one application on the web.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimka Reactive, 2019-01-14
@raoffonom

1) Better SSR if more than one page. With Next.js SSR out of the box plus you can use React-Native-Web.
2) It is possible and complex, since any native module can be added if necessary and throw a bridge into the JS layer. For 3 years of work with him, I did not meet unsolvable problems. React Native is the best solution on the market, since most of the native modules are already written and available in open source. And React Native is usually hated by natives who are behind the times and technological trends.
3) I realized that it’s better not to waste time on sites, and if you do, then on react-native-web or even better, but I haven’t tried react-native-dom yet

L
Leo Developer, 2019-01-14
@crazy_leo

1) SPA applications have a problem with SEO, since the application is not built on the server, but on the client. That is, the whole application, as you wrote above, is in js scripts and the server - gives an empty html page with scripts, etc. But the content of the application itself is not on this page, since it is formed after the scripts have loaded.
It turns out that search engines see an empty page without the content of the application itself.
The only thing, so far, the google search engine has learned to wait until the scripts are loaded and, accordingly, until the application is built. But there are a lot of other search engines that do not know how to do this (Yandex search engine, for example).
Also, the advantage of SSR is that the page appears faster on the client, since it is built both on the client and on the server. And without SSR, a blank page will be displayed first, then the script will be loaded, and only then the application itself will be displayed. But also rendering of average React apps is a lot of calculations, which is very bad on a node. (But there you can do your own hacks to make everything work great)
So you have to compare the pros and cons!
If google search engine is enough for you and you don’t particularly need the page to be displayed faster on the client, then yes, you can do without SSR. (Of course, you can use paid services or some kind of virtual browser, but this is all shit compared to SSR. There are a lot of minuses in these solutions)
If all this is necessary, then you will have to implement SSR. It's not hard. The main thing is to understand the essence of React and some of its companion libraries if they are used (styled-components, redux). (I implemented SSR in 60 average lines. There is a lot of stuff there)
2) You can create applications on it, but I have not used React Native and I can’t tell you for sure. But I know what is there, there is nothing out of the box, if you need something complicated that is not in React Native, then you will have to write native modules under React Native. And of course you can study and use it.
3) SPA is a trend, so it is necessary. It is also a very good concept in the long term, convinced in practice

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question