I\'m working on an app using Leaflet (via react-leaflet). Leaflet directly manipulates the DOM. The react-leaflet library doesn\'t change that, it just gives you React compo
As Thomas already said, yes, you can use renderToString on the client. Just to be clear though, you will need to import ReactDOMServer on the client, which may seem counter-intuitive but appears to be correct. Example (on the client):
import React from 'react';
import ReactDOMServer from 'react-dom/server';
const MyComp = (props) => {
const html = ReactDOMServer.renderToString({someFunc(props)});
// do something with your html, then
return ;
};