r/javascript • u/acemarke • Jun 08 '21
The Plan for React 18
https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html91
u/eternaloctober Jun 08 '21
the pain of a thousand packages with peerDependency on react 16 increases
22
u/eternaloctober Jun 08 '21
cue the PR discussion on whether making react >= 16.8 is ok or if we need ^16.8.0||^17.0.0||^18.0.0
13
u/_eps1lon Jun 08 '21
I've got just the meme for you: https://twitter.com/sebsilbermann/status/1320719525906665472
8
u/eternaloctober Jun 08 '21
i know it's a silly thing to be complaining about on the react 18 announcement ya :) luckily we upgraded to 17 now...look forward to more improvements (also, appreciate your work on material-ui and testinglib! we are heavy users of both)
4
1
u/feketegy Jun 09 '21
I'm doing bi-weekly package updates on the front-end and fixes that potentially pop up.
21
Jun 08 '21
I read it was being bundled with jQuery.
8
u/tills1993 Jun 09 '21
I read it was heavily inspired by PHP.
3
u/sibbl Jun 09 '21
I read it was optimized for a resolution of 1024x768 pixels
1
u/tills1993 Jun 09 '21
I read if you open
React.jsand say Dan Abromov's name 5 times he'll visit you in your sleep the following night.
11
Jun 08 '21
I develop Angular and React Apps(Production). Love the wide selection of libraries in React but at the same time they are confusing. If I want to use forms, I can pick Formik or React Hook Form. If are new developer, When you search for quick comparison you see people prefer one over other and explain their reasons. Which further expands the dilemma. React is good for Simple and Medium size apps. But as the App grows I would pick Angular any time. No matter where I go every Angular Dev follows same approach and core libraries such as forms, router, http client comes out of the box. I don't have relearn another library used by previous developer.
1
u/andrei9669 Jun 09 '21
A friend of mine uses angular in his projects, says that initial build time for large project is really long, is thattrue?
Also, as people have been saying from the dawn of time, don't learn coding language, learn coding. What I mean by that is that by using wide array of differnet libraries you learn to learn new stuff much faster, so that isn't really an issue imo.
But yes it's react's strength and weakness that you can use it however you want, this causes everyone and their mother to have their own architecture design, totally unopinionated.
Also, react isn't a framework, it's a rendering library, it's only job is to render, what else you use for other stuff, is up to you.
2
Jun 09 '21 edited Jun 09 '21
Not true, atleast from what i have seen. Angular build time depends on number of external dependencies you use. I have one other small Angular app in production, it builds under a minute. Same goes for React.
Once you read JavaScript Mozilla docs, all of the frameworks or libraries make sense and feel familiar.
There is a reason why Prettier, Eslint and Typescript(recently) are famous in React world. They just solve some common problems in teams. I have seen people fight over which coding style they wanna use and everybody wants to their own style, which doesn't work well in Teams.
1
u/andrei9669 Jun 09 '21 edited Jun 09 '21
I have one other small Angular app
ah, there's the thing, I mentioned large project.
Once you read JavaScript Mozilla docs, all of the frameworks or libraries make sense and feel familiar.
then... what's the problem? but I would object to that statement, by reading JS Mozilla docs, you will have no idea how some framework might work, just cus under the hood, it might do something completely different, for example nextjs uses file name for slugs, which isn't related to JS in any way.
I have seen people fight over which coding style they wanna use and everybody wants to their own style,
hey, as long as they have a logical reason why they prefer one over another, instead of "it just feels nice", I'm all ears. At the end of the day, it doesn't matter that much as long as the code style is consistent.
There is a reason why Prettier, Eslint and Typescript(recently) are famous in React world.
I'm pretty sure that angular runs from TS, and don't you guys use ESlint and prettier? if not, how the hell do you keep your code consistent? and if you do use, then why did you even bring this up?
I personally like to compare react's ecosystem to a toolkit where you can get the right tool for the right job.
2
Jun 09 '21
What I meant is I have 2 Angular apps. One large and One small. Larger project takes around 5-6 minutes to build because it has many external dependencies. Smaller one builds under a minute.
If you talk about specific framework details, I hate React in some ways. For example JS, jQuery, Angular uses class attribute for css classes and React uses className. Why? If you wanna add css, it has 3 different ways? Am I missing something here. I just feel React made some trivial tasks complex and complex tasks easy (such as rendering)
I used to use TsLint and recently switched to Eslint in Angular projects. As far as code formatting goes Angular keeps HTML, CSS and TS separate(you can use them in same file, I find it easier to read in different files). I didn't find a need to use Prettier. I just use Standard code formatting in WebStorm. And I hate Prettier HTML formatting and find it hard to read(may be that's me).
In React, Since TS and HTML(separate file for css modules) in one page, I use 3 of those.
0
u/Capaj Jun 09 '21
But as the App grows I would pick Angular any time.
lol good luck finding angular developers for bigger projects.Most people aren't even interested in learning it. I get spammed every week with a company desperate to find someone willing to come aboard and continue on some app because their only angular developer left.And don't even get me started on type safety. React blows angular out of the water in strict mode.
0
Jun 09 '21
I disagree. I found many Angular Devs for our projects. Recruiting companies always send emails no matter what. I get emails about Angular and React projects every day. I wouldn't respond to them.
7
Jun 09 '21
[removed] ā view removed comment
0
Jun 09 '21
[deleted]
2
u/SoBoredAtWork Jun 09 '21
It's so sad this doc is written with class components :(
This shit is so much better with functional components and hooks.
2
Jun 09 '21
[removed] ā view removed comment
6
u/AckmanDESU Jun 09 '21
Yeah well if all you have is a contact form then you don't need any library. I've built huge multi step forms with complex interactions and sometimes it is useful to have some of the work done for you.
0
u/PM5k Jun 09 '21
Ah React⦠what started as an over complicated solution is⦠still an over complicated solution. But itās very much the perfect framework for eventually pissing developers off so much they move to better frameworks.
1
u/Sebazzz91 Jun 09 '21
Javascript devs will probably laugh at this, but we've moved to Blazor and never looked back.
5
u/PM5k Jun 09 '21
Iāve done the same thing with Svelte. I tried react after that and it felt like riding a bike without a seat. A pain in the ass.
-4
0
0
Jun 09 '21
[deleted]
-1
u/Shakespeare-Bot Jun 09 '21
Oh mine own god. I hereby reject ssr. Moo worketh f'r thee guys. I simply cannot
I am a bot and I swapp'd some of thy words with Shakespeare words.
Commands:
!ShakespeareInsult,!fordo,!optout
49
u/[deleted] Jun 08 '21
I want a discussion. I recently switched from a Svelte SPA project to a React one. I have been using React for like 2 years. And this was my first Svelte SPA.
I learnt svelte.dev/tutorial in 4 hours and then immediately jumped on a pretty complex project. Turns out. The learning curve wasn't even there. SFCs made code very visible and I have to worry less and less.
The recent project I am doing in React seems so bad in experience. What are your experiences regarding the same, guys?