Live data from Hacker News

Show HN: Reactpack – one command to build your React front end

github.com

11–20 of 48 posts

Re: Show HN: Reactpack – one command to build your React front end

#11
post #8
post #6

Earlier quoted context omitted.

Sigh, that's an absurd way to measure. A "Hello world" is just that: a demo. No-one is: 1) actually making Hello, World pages that will go anywhere near a user 2) Using React in Hello, World pages (which they don't make) 3) Using Reactpack to build the React-based Hello World pages they aren't making

It's not absurd because: 1) Whatever you're making, you're starting out with 177 modules minimum if you use React + Reactpack. 2) See 1.

Surely the important bit is the size of the code that's served to the end user, not the size of the development environment?

My Visual Studio install is easily at least 4GB, yet this doesn't matter to the end user as the packages produced are about 6MB total

Re: Show HN: Reactpack – one command to build your React front end

#13
post #5
post #3

was that...like...a hundred megs for a web page?

177 modules for a Hello World page? Is this satire?

Most of the modules involved are development side resources that don't end up included in the build. Complaining about the number of modules is like installing visual studio, noticing that it takes several gigs on disk and being like "Gigabytes, for a hello world program?"

Re: Show HN: Reactpack – one command to build your React front end

#14
post #8
post #6

Earlier quoted context omitted.

Sigh, that's an absurd way to measure. A "Hello world" is just that: a demo. No-one is: 1) actually making Hello, World pages that will go anywhere near a user 2) Using React in Hello, World pages (which they don't make) 3) Using Reactpack to build the React-based Hello World pages they aren't making

It's not absurd because: 1) Whatever you're making, you're starting out with 177 modules minimum if you use React + Reactpack. 2) See 1.

That's Node, baby. Deal with it.

Re: Show HN: Reactpack – one command to build your React front end

#17
post #9
post #5

Earlier quoted context omitted.

177 modules for a Hello World page? Is this satire?

It's just an example to show what type of code `reactpack` builds, ES6 and JSX with style loading in this case. If you want a more minimal React-like build you can switch out React with lightweight alternatives like Preact or React-lite.

For reference, I build a standalone datepicker module with preact + redux at under 20kb (min + gz)... worked out really well. By comparison, went with regular react recently, and the payload quickly got over 200kb, though I needed a couple relatively heavy libraries for the app in question.

Another point worth mentioning is using react-icons individually (svg based), same for component libraries where you are only using a few components... tends to work out much lighter. Also, if you do use bootstrap as a base css library, work from the source instead of monkey patching the .css output.

Re: Show HN: Reactpack – one command to build your React front end

#18
post #2

Just a small utility for people who are tired of remembering what babel presets or Webpack loaders they need to build a relatively up to date React project.

Looks good! We've been working on something similar at reddit, https://github.com/reddit/node-build, to solve the same issue. It has defaults for react/es6, and I'm also using it without react for building es6 libraries for NPM distribution.

Re: Show HN: Reactpack – one command to build your React front end

#20

react router missing

likewise redux, redux thunks and wireup for router would probably be beneficial as a starting point. Of course at that point, pretty much wandering into starter project territory.

Plus while redux is an excellent redux it's not everybody's cup of tea. (I currently like both redux and mobx depending)
Post reply on HN