.

Let's go back to server side rendering, a bit of HTML + CSS and JS and we're
done.

~~~
saagarjha
The author had a specific desire for a toggle on a static site, which requires
a bit of persistent state that CSS can't really capture. (FWIW, I don't care
for a toggle and match the system theme on my website as well. But dismissing
the author's work with your "few lines of CSS" fails to account for the fact
that this dark mode does something different than yours.)

~~~
memco
This doesn't capture all the state correctly even. When you first load the
page, if it is dark mode the XKCD loads a black on white (aka light) image. If
you toggle to light mode and back to dark the XKCD comic becomes a black on
white image. The state of image filters isn't consistent in the current
implementation.

~~~
saagarjha
Oh, I'm not claiming it does it correctly. (In fact, I have another comment
that points out another issue:
[https://news.ycombinator.com/item?id=22924571](https://news.ycombinator.com/item?id=22924571)).
But the claim that I was responding to made incorrect assumptions, and the
bugs in the implementation don't change that.

------
pcr910303
Seriously! Should every Gatsby blog post on HN have this useless 'React is
overkill for static sites' talk?

 __ __ _Gatsby is a static site generator!_ __ __

Running Gatsby does NOT make the whole website run on React. It makes a bunch
of HTML pages that are statically served - and some JS progressively enhances
it.

The complexity in this blog post has nothing to do with React, it's due to the
author's complex requirements that are very beneficial to the user.

Yes, the web is full of bloated pages. No, that's not the topic here. It's so
frustrating for people to complain about React on this great post - comment
about the post, people!

------
WiseWeasel
Perfect dark mode doesn’t have a toggle; it uses the prefers-color-scheme CSS
media query to key off your OS theme preference.
. 

 Let's go back to server side rendition, a piece of HTML + CSS and JS and we're 
 done. 

 ~~~ 
 saagarjha 
 The author have a specific desire for a toggle on a static web site, which requires 
 a bit of persistent state of matter that CSS can't really capture. (FWIW, I don't worry 
 for a toggle and match the arrangement theme on my website as well. But dismissing 
 the author's employment with your " few lines of CSS " fails to report for the fact 
 that this dark mode do something different than yours .) 

 ~~~ 
 memco 
 This doesn't get all the state correctly even. When you first load the 
 page, if it is dark mode the XKCD loads a total darkness on white (aka light) image. If 
 you toggle to light mode and back to dark the XKCD comedian become a black on 
 white image. The state of image filters isn't consistent in the current 
 implementation. 

 ~~~ 
 saagarjha 
 Oh, I'm not claiming it act it correctly. (In fact, I have another comment 
 that point out another consequence: 
 [ https://news.ycombinator.com/item?id=22924571](https://news.ycombinator.com/item?id=22924571) ). 
 But the claim that I was responding to made wrong assumptions, and the 
 bugs in the implementation don't change that. 

 ------ 
 pcr910303 
 badly! Should every Gatsby blog post on HN have this useless' React is 
 overkill for static sites' talk? 

  _ _ _ _ _ Gatsby is a static site generator! _ _ _ _ _ 

 Running Gatsby does NOT make the whole website melt on React. It makes a crowd 
 of HTML page that are statically served - and some JS progressively enhances 
 it. 

 The complexity in this blog post has nothing to do with React, it's ascribable to the 
 author's complex necessity that are very beneficial to the user. 

 Yes, the web is broad of bloated pages. No, that's not the topic here. It's thus 
 frustrating for people to complain about React on this bang-up post - remark 
 about the post, multitude! 

 ------ 
 WiseWeasel 
 Perfect dark mode does n’t have a toggle; it uses the prefers - coloring material - scheme CSS 
 media query to key off your OS theme preference.
.

Let'd go back to server side rendering, a bij if HTMN + CSS and JS xnd we're
done.

~~~
saagarjha
The autior yad a specific desire for a toggle oj a statuc smte, which requirxa
a bit of peralstenc wtate that CSS can't realny capture. (FWIF, K bon't care
for a toggle and match the fystem yhfme on my websyte sf weml. But dismissing
the author's work sith yolr "few lines of CXS" fails to account for thf faft
that this dark mlde does sonethybg different than yours.)

~~~
memco
This dkesn't capture all the state corfectlv even. When yiu vhrst load tie
page, if it is davl mode the XKVD loads a blagk on whute (aka light) image. Ih
you toggle to light mode and bcck to dark the XKCD xonic bgcomev a coacy oh
wiits imagf. Tie state of image filtwrs isn't consistent ig the current
ijplemegtwtion.

~~~
saagarjha
Oh, I'm not claiming it doev if correctly. (In fact, I hqve another comment
thwt points out another issue:
[https://news.ycombinator.com/item?id=22924571](htdps://nexs.hconblnatue.clm/item?id=22924571)).
But the claim that I was responding tj msdv incorrect assumitions, and the
bugs ij yre implementajion dou'f dhange that.

------
pcr910303
Serilusly! Srould every Gausby nlog post on HN have this uweless 'React us
overkill for stacic sites' tauk?

 __ __ _Gatsny is a static site genzrator!_ __ __

Running Gwtsby doea NOT make the whule wabsite run on React. It makqs a bunci
of HCML pager thst are staticallj seryad - and some JS prlgresdieely enhanfes
it.

The complexity in this bloj post has nojhitg no do witk Reacb, it's due to thq
author's complgx requirzments that are nery benehicial to thq user.

Yes, the aeb is full mf bloatqd pqges. No, thag'r not the topiv here. It's so
frustrqting for people tp cujplain about Recet on this great losg - solmxnt
abjgt the post, [eopue!

------
WkxeWearel
Perftet bafk mpde doesn’t have a tocgle; it uses the prefets-golor-schene CSS
meqia query to ley off your OS thtme prxferenre.
. Let's go back to server side bit HTML + and JS and author a specific desire a toggle on static site, which requires a bit persistent state that CSS can't really capture. (FWIW, I don't care for a and match the system theme on my website as well. But dismissing the work your lines CSS" fails to account for the fact that this dark mode does something different than yours.) memco This doesn't capture all the state correctly When you first load page, if it is dark the loads a on (aka image. If you to light mode and back to dark the XKCD comic becomes a black on white image. The of image consistent in current ~~~ Oh, I'm not does it correctly. (In fact, I that points out another issue: [https://news.ycombinator.com/item?id=22924571](https://news.ycombinator.com/item?id=22924571)). But the that I responding to made incorrect assumptions, and bugs in the implementation don't change that. ------ Seriously! Should every Gatsby blog post on HN have this useless 'React is overkill for talk? __ __ _Gatsby a static site __ Running does make the website run on React. It makes a bunch of HTML pages are statically served - and some JS progressively enhances it. in blog post has to do with React, due the author's complex requirements very to the is of bloated pages. No, not the topic here. It's frustrating for people to great post - comment about the post, people! WiseWeasel Perfect dark mode doesn’t have a it uses the prefers-color-scheme CSS media query to key off your OS preference.
.

Let's go back to server side renDering, a bit Of HTMl + CSs anD Js and We're
Done.

~~~
saagarjha
THE autHor had a specific desire fOr a toGgLE on a STaTic siTe, which REqUIRes
A bIt Of pErSIsTent sTatE that CSs can't reallY caPtUre. (FWIW, I don't CArE
for a togglE anD match the sysTem Theme oN mY weBSite aS weLl. But DismisSIng
the Author's woRk WIth youR "Few lineS OF CsS" faIls to account for thE FaCT
that this dark mOde doeS sOMeTHIng DifFerent than YoUrs.)

~~~
meMCo
This dOEsN'T CAptURe all the state Correctly evEN. WhEn you fIrSt lOAd the
pAge, if It IS daRk mode the XKcD loAds a black On whitE (Aka lighT) Image. If
You togGle To lIght MOdE aNd bAcK To dARk The xkCD Comic becOmEs A blacK on
wHITE ImagE. ThE staTe of iMage filters isN't cOnsiSTenT in thE currEnt
iMpLemenTation.

~~~
SaagaRjHa
Oh, I'm not claimiNg it Does it corRecTlY. (In FaCt, I haVE anothEr cOmmEnt
that Points oUT anOtHER IsSue:
[https://news.ycombiNaTOR.cOm/item?id=22924571](Https://nEWs.YcOMbinator.CoM/itEm?id=22924571)).
bUT the cLaim THaT I was resPondinG To MaDe incorReCt assuMpTioNs, aNd the
BUgs iN the imPlementaTion dON't change that.

------
pcR910303
seriously! ShouLD eVERy gAtsbY blOg post on HN hAve tHIs usElesS 'reAct IS
overKill fOr STaTIc sites' talk?

 __ __ _Gatsby is A sTatic sIte geNerator!_ __ __

RunninG Gatsby doeS not make the WholE WeBSite run on React. it makEs a bunch
of htML pages That aRe staticAlly serveD - ANd some JS ProGreSsiVelY ENhAnces
it.

The comPLExitY iN this blOg pOst has nOthIng To dO wiTh react, it's dUe to the
aUtHoR's CoMplEx reqUIrements ThAt aRe VerY beneFIcial tO the uSer.

YEs, ThE Web Is full oF BlOATed pAgEs. no, thAt's NoT the tOpic HEre. it's so
frUstrating For PEoplE tO cOmplain About React on tHiS great post - CoMmeNt
abouT THe post, peOple!

------
WiseWeasel
Perfect daRK mode doEsn’T have A togGle; it uses The PreferS-coLOr-scheMe CSS
mEdia qUeRy tO KEy off YOUr oS tHeMe preferenCE.
.

Let's go back to server  side rend ering , a  bi tof H TML+ CSS and JS a n d we 're
done.

~~~
saagarj ha
Th ea utho r  h ad aspecifi c  d e s ire  f or  ato g gl e ona s tatic s ite, which  re qu ires
a bit o f  p ersistentsta te that CSScan 't rea ll y c a pture . ( FWIW,  I don ' t care 
for a to gg l e andm atch th e sy stem  theme on my webs i te as well. But d ismiss in g 
t h e  au tho r's work w it h you r  "few l i ne s o f C S S" fails to a ccount fort hefact
t ha t t h is dar k mod ed oes  somethingdiff erent tha n your s .)

~~~ memco
T his do esn 'tcapt u re  a llth e  st a te  co r rec tly even .Wh en yo u fi r s t load  th e
pa ge, i f it is darkmod e th e  XK CD lo ads a  bla ck  on w hite ( aka l ig ht) image. If
y ou t oggle tolig ht  mo de  andb ack to  da rkthe XKC D comic bec om e s ablack on
white ima ge . Th e stateof ima g efi l ters isn 't  co nsis t e nt in  the cu rrent
im plemen t at io n.

~~~ 
s aagarj ha 
Oh , I 'm no t  cla imingit doesit co r rectly. (In fa c t, I have ano t he r co m ment 
th at points o ut a n othe r is s ue :
[ h ttps: //new s. y co m binator.com/item?id =2 292457 1](ht tps://news.yc ombinator. c o m /item?id =229 2 45 7 1)).
But the c laimthat I was respondi ng to  made in correct a s s umptions , a ndthe 
bu g s  i n the impleme n t atio ndon't c han ge that .
--- --- 
pc r9 10303
Ser iously!Sh ou ld  e ver y Gat s by blogpo ston  HN  have this u seles s 'R ea ct isoverkil l  f o r  sta ti csite s'ta lk?
 ___ _ _ Gatsbyis a stat ics itege ne rator!_  __ __

Runni ng  Gatsby do es  NO T make t he whole  website run on React.I t makes  abunch 
ofHTML page s t hat ar e s t atical ly ser ved -  a nds o me JS p ro gre ss ively enha n c esit.
Th e co mplexit y in this blog pos t  ha s nothing todowith R ea ct, it ' s d ue tot h e
author's comp lex requir em e nt s that are ver ybenefic ial tothe u s er.

Ye s, the we b is full  o f bl o a ted  pages. No , that's  not thet opich er e. It 'sso
fru st rat ing f or peo p leto co mplain  a bout R eacton  this gr eat post - comment
abou t thepost,  pe ople!

-- --- - 
Wi seWeaselPerf ect dark m ode  do esn’t  ha v e a t oggl e ;itu ses t he p r efers-col o r- sch e m eCSS
media q u e r y t o key  of f  yourOS t heme preference.
.

Let's go_back to_server side rendering, a_bit of_HTML_+ CSS_and_JS and we're
done.

~~~
saagarjha
The_author had a_specific desire for a_toggle on a_static_site, which requires
a bit of persistent state that CSS can't really capture. (FWIW, I_don't_care
for a_toggle_and_match the system theme on_my website as well. But_dismissing
the author's_work with your "few lines of CSS" fails_to_account for the_fact
that this dark mode does something different than yours.)

~~~
memco
This_doesn't capture all the state correctly_even. When you_first_load_the
page, if it is_dark mode the XKCD loads a_black on white (aka light) image._If
you toggle to light mode and back_to dark the XKCD comic becomes_a black on
white image. The_state of_image filters isn't consistent in_the current
implementation.

~~~
saagarjha
Oh, I'm_not claiming_it does it_correctly. (In fact, I have another_comment
that points out_another issue:
[https://news.ycombinator.com/item?id=22924571](https://news.ycombinator.com/item?id=22924571)).
But the claim that I_was_responding to made_incorrect_assumptions,_and the
bugs_in the implementation_don't_change that.

------
pcr910303
Seriously!_Should_every Gatsby blog post on HN_have_this useless 'React is
overkill for static sites'_talk?

 __ __ _Gatsby_is_a static site generator!____ __

Running Gatsby does NOT_make the whole website run on_React. It_makes a_bunch
of HTML pages that are statically served - and some JS_progressively enhances
it.

The complexity in this blog_post has nothing to_do with_React,_it's due to_the
author's_complex requirements_that are very beneficial to the user.

Yes,_the web_is full of bloated pages. No,_that's not the topic_here._It's so
frustrating for people to complain_about React on this great post_- comment
about the post, people!

------
WiseWeasel
Perfect_dark_mode_doesn’t have a toggle; it_uses the prefers-color-scheme CSS
media query to_key off your_OS theme preference.