ilc icon indicating copy to clipboard operation
ilc copied to clipboard

Gatsby

Open mbekron opened this issue 5 years ago • 3 comments

Would it be possible to render a Gatsby app via ILC?

mbekron avatar Jan 11 '21 14:01 mbekron

Hi! Since Gatsby uses React under the hood it should work. See React related docs & build integration accordingly.

ILC + React examples:

  • https://github.com/namecheap/ilc/tree/master/docs/stepbystep/react
  • https://github.com/namecheap/ilc-demo-apps/tree/master/apps/people

single-spa + React integration (ILC uses single-spa at client side): https://single-spa.js.org/docs/ecosystem-react

Also keep in mind that ILC is framework agnostic, so if your app implements required interface - it will work.

StyleT avatar Jan 11 '21 14:01 StyleT

In theory I agree this should work, I am having some trouble with gatsby though due to the way it generates files. It seems to essentially do server side rending, but statically at "compile" time to output the generated screens. Not 100% sure how we'd go about loading the gatsby screens into ilc.

mbekron avatar Jan 12 '21 14:01 mbekron

I would try to write a simple node.js proxy which implements ILC <-> app server side interface and "adapts" static files that were generated by Gatsby to ILC.

Honestly speaking we never tried to pair ILC with static website generator as we mostly target "classic" SSR apps with node.js server. If you're really interested in this - we can schedule a call to discuss possible approaches to integration.

StyleT avatar Jan 12 '21 15:01 StyleT