DEV Community

Discussion on: Gatsby.js Browser APIs Explained: wrapPageElement vs wrapRootElement

Collapse
 
code_rabbi profile image
Emeka Orji

I'm sorry, but this is not explanatory at all, take out time to understand things before you post because this gives some people a headache.

I clicked this link hoping to find answers and it's like I'm back to the Gatsby docs page but with a different layout

Collapse
 
crock profile image
Alex Crocker

I'm sorry you feel that way, but maybe you should try to learn React basics first before diving into a framework. Others seem to enjoy this content and it ranks first on Google when searching for the difference between wrapPageElement and wrapRootElement, which are both Gatsby-specific functions.

It's not meant to be an extensive article, but just a quick summary of the primary difference between the two with a code sample.

Collapse
 
code_rabbi profile image
Emeka Orji

Yes I understand..

It just needs better in-depth explanation. If something is to be explained, it should be done well.

It helps the reader.
If it is heavy to write about two APIs, just write one instead and explain that one thing well. Cause one of the most annoying things about articles is seeing a header that says one thing and a content that says something else. It kills expectation.

And yes, I use a number of frameworks, understand react and use the wrapPageElement and wrapRootElement, but every now and then one needs to grasp a point really quick and refers to a doc, post, blog or a post that may have been written by himself.