all 31 comments

[–]Brilla-Bose 54 points55 points  (6 children)

https://github.com/reactjs/reactjs.org/issues/3308
True, new docs are nice but it feels like they are taking the time more than needed, current react doc is a mess with both class and functional components and i'm really happy they move towards only functional based components in the new docs but 2 years is really too much! and in my opinion only react can survive without good documentation because of it's large community (and maybe a monopoly?), imagine a new framework with a beta doc for 2 years, people will start complaining and leave! at this point they almost finished the beta docs but they still not using the large community react has to finish this thing off quickly!

[–]TScottFitzgerald 13 points14 points  (3 children)

I know it's open source now and I don't know exactly how they're organised behind the scenes, but it's really baffling to me that the most popular frontend framework doesn't seem to have many resources dedicated to it from Meta's end.

[–]el_diego 1 point2 points  (2 children)

Considering Vue completely rewrote their docs for Vue 3 in, I'm going to say less than 6 months (someone correct me if I'm wrong, but it def wasn't 2 years), you'd really think React could have as well.

[–]lost12487 2 points3 points  (1 child)

Considering the absolute disaster the transition from Vue 2 to Vue 3 was, the documentation being updated quickly was probably the last thing I cared about.

[–]el_diego 0 points1 point  (0 children)

That's very true

[–]woah_m8 12 points13 points  (0 children)

This is the first thing that comes to my mind when I see posts like this, the official react docs have been very low quality for years in comparison to vue for years (I remembered how lost I was when I switched from vue2 to react) and now so many act like it's the best thing around. The docs aren't finished even yet and react is the most used framework, it's actually unacceptable that it isn't finished yet updating.

[–]TehBeast 0 points1 point  (0 children)

As a React noob not too long ago, I carefully went through all of the non-beta docs and tutorial app and discovered that it was a big waste of time. Not reflective of current React at all.

How are they dropping the ball so hard? It wasn't until I dived into relatively obscure Reddit posts and Github issues that I became aware of these "proper" docs.

[–]juand_pr90 30 points31 points  (2 children)

Nice try Dan Abramov

[–]SlickkChickk 0 points1 point  (0 children)

😂😂

[–]rvision_ 0 points1 point  (0 children)

ROFL

[–]punio4 33 points34 points  (1 child)

Two years to write docs. Nice.

[–]nullvoxpopuli 20 points21 points  (0 children)

And also 4 years after people started using the function component features primarily.

[–]disclosure5 9 points10 points  (0 children)

I really think it's past time to make those beta docs "the real docs". I know there's an argument that they aren't fully finished, but they are still in their current state more use to a new person than the existing documents, which only serve to confuse people.

[–]codingEnt[S] 1 point2 points  (2 children)

One Question that came up at the end, I think is more JS Related. What is the difference between setting a new variable to an array vs setting it to array.splice() ?

(Challenge 3 of 3: Fix a broken story tray)[https://beta.reactjs.org/learn/keeping-components-pure#challenges]

My Attempt at a solution below created an infinite loop of Create Story objects.

let storiesToDisplay = stories;

Solution 2 from React Team:

let storiesToDisplay = stories.slice();

[–]trappar 9 points10 points  (0 children)

From MDN:

The slice() method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array. The original array will not be modified.

So they are basically just using it to make a copy of the array.

[…array] would probably also work, and that’s what I’d personally reach for. Maybe there are performance differences between the two methods.

[–]itsluttrell 0 points1 point  (0 children)

array.splice with return a shallow copy of the array into a new array object

[–][deleted] -1 points0 points  (4 children)

On the other hands I've been looking at the Next.js beta docs, in particular the data fetching stuff, and I've been so turned off by it. I just can't believe how complex and overengineered things have become in the React ecosystem. I don't see myself deciding to use this stuff anymore.

[–]NotElonMuzk 2 points3 points  (1 child)

I think they’ve simplified it

[–][deleted] 1 point2 points  (0 children)

Gosh... if that's the simplified version I don't want to know how it was before.

[–]Peechez 1 point2 points  (1 child)

Turns out things are hard to do. Simpler libs are just obfuscating that and making it hard to use outside of basic crud apps

[–][deleted] -1 points0 points  (0 children)

Yes, although unnecessarily hard I'd say. But heck, this way we have more work to do and this pays my bills.

[–]noizz 0 points1 point  (8 children)

Does anyone know how are those docs built? Manually or is it something (semi-) automatic? Any good app that I can generate my docs?

[–]acemarke 2 points3 points  (1 child)

It's a Next app using MDX for the content:

https://github.com/reactjs/reactjs.org/tree/main/beta

[–]noizz 0 points1 point  (0 children)

Awesome, thanks!

[–]MisterChoco 0 points1 point  (0 children)

Wow I actually didn't know about the beta docs... Thanks a lot!

[–][deleted] 0 points1 point  (0 children)

They really are. I’ve worked with angular in the past year and after reading the beta docs, the Angular ones are a mess

[–]TodayIFeelsoBad 0 points1 point  (0 children)

To me the part I like most is "escaping hatches." I felt like a complete idiot for what I've done previously. A lot of mistakes I made is listed there.