Meta tags:
description= Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand.;
Headings (most frequently used words):
js, code, splitting, modulea, app, with, react, router,
Text of the page (most frequently used words):
the (12), react (10), app (9), #modulea (8), code (7), this (6), splitting (6), you (5), adding (5), and (4), import (4), github (3), with (3), router (3), using (3), can (3), use (3), load (3), button (3), css (3), create (3), started (2), docs (2), public (2), folder (2), page (2), also (2), check (2), out (2), section (2), are (2), its (2), that (2), more (2), chunks (2), copy (2), export (2), div (2), handleclick (2), then (2), component (2), here (2), module (2), which (2), your (2), files (2), stylesheets (2), copyright, 2025, facebook, inc, social, contributor, covenant, twitter, discussions, stack, overflow, community, learn, get, installing, dependency, next, previous, last, updated, max, romanyuta, 2021, edit, documentation, tutorial, syntax, prefer, await, async, will, make, all, unique, dependencies, separate, chunk, only, loads, after, user, clicks, for, information, created, see, production, build, default, onclick, return, render, handle, failure, err, catch, extends, class, from, hello, const, example, project, setup, supports, via, stage, function, like, form, takes, name, argument, returns, always, resolves, namespace, object, promise, proposal, dynamic, instead, downloading, entire, before, users, allows, split, into, small, demand, support, advanced, usage, deployment, back, end, integration, testing, building, loading, graphql, images, fonts, post, processing, reset, sass, modules, styles, assets, development, getting, welcome, search, help, deprecated, read, skip, main, content,
Text of the page (random words):
code splitting create react app skip to main content create react app is deprecated read more here create react app docs help github search k welcome getting started development styles and assets adding stylesheets adding css modules adding sass stylesheets adding css reset post processing css adding images fonts and files loading graphql files using the public folder code splitting building your app testing back end integration deployment advanced usage support on this page code splitting instead of downloading the entire app before users can use it code splitting allows you to split your code into small chunks which you can then load on demand this project setup supports code splitting via dynamic import its proposal is in stage 4 the import function like form takes the module name as an argument and returns a promise which always resolves to the namespace object of the module here is an example modulea js const modulea hello export modulea copy app js import react component from react class app extends component handleclick import modulea then modulea use modulea catch err handle failure render return div button onclick this handleclick load button div export default app copy this will make modulea js and all its unique dependencies as a separate chunk that only loads after the user clicks the load button for more information on the chunks that are created see the production build section you can also use it with async await syntax if you prefer it with react router if you are using react router check out this tutorial also check out the code splitting section in react documentation edit this page last updated on 4 11 2021 by max romanyuta previous using the public folder next installing a dependency modulea js app js with react router docs get started learn react community stack overflow github discussions twitter contributor covenant social github copyright 2025 facebook inc
|