DEV Community

Discussion on: How I Built My Dream Portfolio Site

Collapse
 
ra1nbow1 profile image
Matvey Romanov

How did you ensure such a quick api update dev.to?

Collapse
 
gedalyakrycer profile image
Gedalya Krycer

Actually, just this week I found a weird glitch that if I specify &per_page twice, with the first value being 1000 (max request number) and the second value being the amount I really want (6) — the articles update right away.

Otherwise, they can take up to a day for new reactions/articles to show up.

axios.get('https://dev.to/api/articles?username=gedalyakrycer&per_page=1000&per_page=6')
Enter fullscreen mode Exit fullscreen mode

I have no idea if this a bad practice, but so far I am getting no errors and decent results. lol 🤷


I am also using "Suspense" and "lazy" from React on all my "page" components. These won't load any section components until they are needed.

Example: github.com/GedalyaKrycer/gedalyakr...

Hope that helps!

Collapse
 
ra1nbow1 profile image
Matvey Romanov

Thanks