Bada
Bada's Coding

Bada's Coding

(React) Suspense

Bada's photo
Bada
·Jul 29, 2022·

1 min read

Concept

'Suspense' helps us to load something later easily.

From now on, let me show you two examples, one with it and one without it.

One without It

One with It

Code Splitting

This applies to the both examples.

Please copy the code and run it.

If you go to [Chrome DevTools > Sources > Page > top > the URL you belong to > static/js], you can find 'Divide' is separated from 'bundle.js'.

 
Share this