Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

React Static

A fast, lightweight, and powerful framework for building static-progressive React applications and websites.

React Static / General

Load a component client side only


June 12, 2018 · 6:53pm

I would approach this with a hybrid solutionp

  • reply
  • like

Trending data is probably not something that you need in the static content

  • reply
  • like

(unless it is crucial to the navigation of your site)

  • reply
  • like

in that case, I would simply use component state to fetch the data at runtime on the client

  • reply
  • like

There isn't really a happy medium between the two where you don't run into impossibilities

  • reply
  • like

So unless it's crucial for SEO, I would just request it from an api (or a cached JSON file in /public like you said)

  • reply
  • like

Thanks for the response - yea I will probably have to go with a static json, I was just wondering if react-static or react-universal could automate that for me in some way. Although I think that is just a bandaid and my real problem here is Netlify can't handle a react-static site this big.

  • reply
  • like

June 16, 2018 · 7:54pm

I agree. Netlify should be able to do some type of diffing and only upload files that have changed. I thought that they do though?

  • reply
  • like

They do - the issue I was having was getting the site loaded for the first time so I never really got to use the diffing to help out. I ended up moving to an Enterprise account and that pretty much solved all the issues.

  • reply
  • like
Your message here...

*bold*_italic_`code````codeblock```