We are finishing website on React but for SEO purposes we need to identify useragent and "deliver" for search engine crawlers a static version (SSR) of website, and normal SPA to other useragents. I found that with next.js we can make SSR but it seems website will be SSR for all useragents in this case.
So the issue is how to identify useragent and deliver version of website (SPA/CSR or SSR) depending on useragent type.
I know that there are a way if setup Nginx in front of React server to route (kinda proxy) requests. But I'm interested in React only solution