React-helmet: Initial Page Load issues - Head not updated until after load.

Created on 30 Aug 2017  路  3Comments  路  Source: nfl/react-helmet

Working with an issue right now, trying to get the head to update as soon as possible, as my page loads data over time and shows a loading div until its done.

Throughout the request though, enough data is populated early to update the head. However, even if i render different data in <Helmet {...this.meta()} />, none of it is rendered/updated in the dom until AFTER the page is fully loaded.

Is there a way around this, besides SSR?

Most helpful comment

@aequasi We just released a defer prop that you can set to false which will not use requestAnimationFrame and instead will update the DOM as soon as possible. If you want data to show up even earlier, make sure to put your most important data as high up in your component tree as possible.

All 3 comments

@aequasi We just released a defer prop that you can set to false which will not use requestAnimationFrame and instead will update the DOM as soon as possible. If you want data to show up even earlier, make sure to put your most important data as high up in your component tree as possible.

Awesome! That worked.

closed by #297

hi.
@cwelch5 thank you.
defer={false}
work for me .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bradbarrow picture bradbarrow  路  4Comments

bassarisse picture bassarisse  路  3Comments

olalonde picture olalonde  路  3Comments

MiguelMachado-dev picture MiguelMachado-dev  路  4Comments

brokentone picture brokentone  路  4Comments