superhuit-agency / superstack

Our opinionated headless WordPress boilerplate - with GraphQL, RSC, PostCSS
MIT License
24 stars 4 forks source link

Improve fetch-api #60

Open kuuak opened 2 months ago

kuuak commented 2 months ago

I did a quick check about the performances concern of first parsing to text then parsing to JSON vs directly parsing to JSON. There is not significant deterioration or improvement in performances. I created a quick jsperf test to compare. Claude.ai also indicate that it should not change anything in perf, it's just a matter of readability

Capture d’écran 2024-08-15 à 15 39 35

geck1942 commented 2 months ago

Excellent! I'm glad there is no much performance impact so I'm all in on the PR