Code Splitting Review and Q&A

In notebook:
FrontEndMasters Intermediate React
Created at:
2019-06-24
Updated:
2019-08-15
Tags:
React libraries JavaScript Webpack

https://frontendmasters.com/courses/intermediate-react-v2/code-splitting-review-and-q-a/

Questions

Question: Does it just bubble up to the nearest suspense?

It finds the first parent <Suspense> component or crashes if doesn't find one.

Note: we didn't use <Suspense> in details for the Modal.

Question: Parcel vs Webpack?

They both detect the dynamic import and split intelligently.

It used to be much more complicated to do, today it's really easy with the lates version of React.