I am working as a web developer for nearly 20 years. I care a lot about simple and maintainable code that is fun to work with, good documentation and clean APIs.
You should definitely mention just HOW BIG the xlsx module is. Its over 400kb of minified javascript. Thats nothing you should casually load alongside your app just because someone might want to save an excel file.
And if you want to create a React table component, it should not be built with excel export included in the component. That logic definitely belongs someplace else.
There may be a rare case of when there is really no other way than generating the excel file in the browser - but the way your article is written most people get the idea that there is no downside at all to that approach. "Just install those three modules" sounds simple but in the background you are getting truckloads of additional code into your application. Your article seems to be aimed at beginners.
So big red warning: you would normally NOT want to do it this way, but there MAY be reasons to do so.
I write about various topics that I'm currently learning, be it front end, back end, cloud, DevOps, etc., you name it!
For any questions you may have, you can reach out to me at: hello@hungvu.tech.
I agree it has an impact on performance and should have more consideration in a real product implementation, but again, that was not the point of this article (at least in the way I interpret it).
The table example was simply based on MUI data grid, which was on top of my head at that time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You should definitely mention just HOW BIG the xlsx module is. Its over 400kb of minified javascript. Thats nothing you should casually load alongside your app just because someone might want to save an excel file.
And if you want to create a React table component, it should not be built with excel export included in the component. That logic definitely belongs someplace else.
There may be a rare case of when there is really no other way than generating the excel file in the browser - but the way your article is written most people get the idea that there is no downside at all to that approach. "Just install those three modules" sounds simple but in the background you are getting truckloads of additional code into your application. Your article seems to be aimed at beginners.
So big red warning: you would normally NOT want to do it this way, but there MAY be reasons to do so.
I'm not the author by the way, just a passerby.
I agree it has an impact on performance and should have more consideration in a real product implementation, but again, that was not the point of this article (at least in the way I interpret it).
The table example was simply based on MUI data grid, which was on top of my head at that time.