4 ms·
I am totally with you regarding React: I've been distracted from my current SwiftUI project writing a React "teaser" version because it's so much easier to make
by edw 7y ago
I am totally with you regarding React: I've been distracted from my current SwiftUI project writing a React "teaser" version because it's so much easier to make progress in React, in large part thanks to the strong documentation.
But even there, there are nontrivial problems. Look at the front page of reactjs.org: all of the examples use component classes. The tutorial introduces component classes without mentioning that they're a huge PITA compared to function components using hooks and that they need/should only be used in a few legacy corner cases.
React 16.8.0, the first stable release featuring hooks, came out in February of '19. May I suggest that it's not finished until the home page and tutorial are updated?
- chriskrycho 7y ago100% agreed.
- hesarenu 7y agoComponent classes are not legacy, you can still use them. Functional are better in most cases.
- edw 7y agoYou're splitting hairs and all but disagreeing with yourself in your own comment. Notice that I did not say "deprecated." The React Way is to not obsolete working code. Component functions are preferred and better and recommended. Class based component code should indeed be considered legacy code.
- hesarenu 7y agoFacebook have not declared it as legacy hence it would not be legacy. Considered and is legacy are 2 different things. Anyway you don't need to take me seriously dude, you can have your own opinion.