Using OHIF Viewer in a NextJS Application


Has anyone had success integrating the OHIF Viewer in a NextJS application? Since OHIF Viewer is a React component, this should be possible. Just looking for any suggestions or example. I would like to embed the Cornerstone viewer in my own web app. And eventually point at my own image server.


I think this will not work, at least not with NextJS’s Server Side Rendering, since the cornerstone library relies on the window-object. You could render client-side though.

(But I’d also be interested if someone has a working example of integrating OHIF and NextJS)