I am a newbie with React.js and just for practice i made a simple counter web app. But i noticed that the project is more than 120MB. Is it possible? do i need to do something to shrink it?
Is it normal that a simple counter react app is more tham 100MB?
1.9k Views Asked by Rayden C At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in REACTJS
- ussd reader in Recket Native module
- Teams tab application returns SSO error in mobile Outlook
- Github Pages Deployment deploys a blank page
- Is there any way to glow this bulb image like a real light bulb
- Optimize LCP ReactJs
- Page in React only renders elements after refreshing
- Unable to Post Form Data to MongoDB because of picturepath
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- Hooks are not supported inside an async component error in nextjs project using useQuery
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- On the server side, it returns undefined but on the client side, logs the values no problem
- Multilevel dropdown with checkboxes in Select component
- TypeScript Error only on big type only when assigned to a variable
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Data is not filtering in props. Showing passdata.map is not a function
Related Questions in PERFORMANCE
- Upsert huge amount of data by EFCore.BulkExtensions
- How can I resolve this error and work smoothly in deep learning?
- Efficiently processing many small elements of a collection concurrently in Java
- Theme Preloader for speed optimization in WordPress
- I need help to understand the time wich my simple ''hello world'' is taking to execute
- Non-blocking state update
- Do conditional checks cause bottlenecks in Javascript?
- Performance of sketch drastically decreases outside of the P5 Web Editor
- sample query for review for improvement on big query
- Is there an indexing strategy in Postgres which will operate effectively for JOINs with ORs
- Performance difference between two JavaScript code snippets for comparing arrays of strings
- C++ : Is there an objective universal way to compare the speed of iterative algorithms?
- How to configure api http request with load testing
- the difference in terms of performance two types of update in opensearch
- Sveltekit : really long to send the first page and intense CPU computation
Related Questions in PROJECT
- Need advice for a project
- Plugin with id 'com.android.application' not found in Github Winlator Project
- Import error in tensorflow in jupyter notebook ( import tensorflow_io as tfio )
- How to create a multiple line typing animation with only CSS?
- Using Eclipse Maven project, import new version of a class from a jar file created from another Maven project
- Eclipse: "package...does not exist" when building a Maven package that references a class in another project
- Azure DevOps team and work item structure for larger projects which affects multiple systems
- Is there a way to add bulk of files to a Visual Studio C++ project?
- I'm in Playwright, how do I run specific test cases by tag in (CI) execution
- Implementing JWT Authentication in a Node.js Application
- Copying field from MSproject Gant view to Resource Sheet view gettign error 91
- How to pass through a VBA Project Password and remove the VBA Project Password via vb code
- how to analyse a project in sonarcloud
- How can I hide the "BRAND NEW" project in my portfolio?
- How to automate report writing by extracting relevant text?
Related Questions in MEGABYTE
- Python recognize strings of numbers with K, M, G, or k, m, g, or KB, MB, GB, etc as filesizes for comparison or math
- Ansible Need generic solution to find size of folder/directory or file
- suppose there is a computer with 18 bits address space and the cell size is 8 bits, then what is the smallest and highest address?
- Is it normal that a simple counter react app is more tham 100MB?
- How to Resize the images to set particular Megabyte using Python
- Confusion calculating size between Bytes and Megabytes
- Converting from bytes to GB or MB returns nothing
- Gigabyte to Megabyte
- What is the size of MINI_KIND in megabytes in android
- Is possible to set hadoop blocksize 24 MB?
- ioStat and Awk Output and Format with Megabyte and end of each field
- MySQL Convert Bytes to Kilobytes, Megabytes, Gigabytes
- Byte to megabyte conversion doesn't work
- database space quotas with hibernate and postgresql, limit database megabytes used per user
- C# How do I shorten my double when I converted bytes to megabytes?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
120mb can he huge or nothing at all depending on where you get that number. Remember, a modern web app (such as one built with React) needs build tools and often a development server and more. Also, if you are using typescript it will in itself add a compiler that is up towards 40mb.
So if we look at the source directory you'll have your own code plus some build configuration (probably in a webpack configuration file) which totals a few kilobytes. But then we have the
node_modulesfolder which contains all the dependencies for both your own code and the build tools. This isn't a problem and since this folder won't be sent to the client and you shouldn't even commit it to your SCM since it can be restored from your packages.json file.I did a quick check of the folder size in
node_modulesin a new dotnet-react project (because that was what I had handy) and this is what I got.So here we can see that typescript is by far the largest dependency eating up almost 25% of my project and there are still quite a few other large dependencies as well. But this is till just for
If we on other hand look at what is actually delivered to the client that should be a completely different matter. This is what actually matters since this will directly impact the performance of your application. A large app here will be both more code to download and more code to parse for the client.
This same app looks like this when running the project for development and checking network traffic in Chrome Inspector.
So here we can see three script files, but even in development mode only about 520kb is sent to the client even though my
node_moduleswas about 180mb.If we then go one step further and build this for production we get an even better result.
Now we are down to just about 270kb for the scripts which is just a fraction of the size of the project folder.
So to summarize:
node_modulesto your SCM.