Facebook wrote a language just for React (it's pretty cool)

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024
  • I know Flow isn't exactly cool, but these changes absolutely are. TypeScript may not adopt them but let a dev have some hope.
    SOURCES
    / announcing-component-s...
    Check out my Twitch, Twitter, Discord more at t3.gg
    S/O Ph4se0n3 for the awesome edit 🙏
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 253

  • @vcankeklik
    @vcankeklik 7 หลายเดือนก่อน +571

    Why don't you guys write a browser and even a new OS for React? That would be so Meta...

    • @ArcticPrimal
      @ArcticPrimal 7 หลายเดือนก่อน +30

      A browser that truly, fully doesn't cache anything when you disable caching would be great. There have been many instances when you save, and no changes are reflected

    • @vcankeklik
      @vcankeklik 7 หลายเดือนก่อน +7

      ​@@ArcticPrimal Probably not happening soon, maybe a "VDOM is dead" article instead?

    • @kanbekan
      @kanbekan 7 หลายเดือนก่อน +10

      But there's ReactOS already...

    • @vcankeklik
      @vcankeklik 7 หลายเดือนก่อน +3

      @@kanbekan and it looks good

    • @kasper369
      @kasper369 7 หลายเดือนก่อน +4

      its all fun and games until some one does it

  • @wlockuz4467
    @wlockuz4467 7 หลายเดือนก่อน +160

    We have put a bandaid on the bandaid that was supposed to stop the bleeding from the previous bandaid so that you don't have to put more baindaids yourself over the bandaids you already have put.

    • @SamualN
      @SamualN 7 หลายเดือนก่อน +4

      this is how engineering works in every industry

    • @terjeber
      @terjeber 7 หลายเดือนก่อน +2

      Meta is the only company I know that thinks that you can fix a decapitation with bandaids.

    • @salvimateus
      @salvimateus 6 หลายเดือนก่อน +2

      hater detected

  • @dough-pizza
    @dough-pizza 7 หลายเดือนก่อน +52

    Prime is foaming at the mouth right now

  • @everyhandletaken
    @everyhandletaken 7 หลายเดือนก่อน +104

    I don't know how to react

    • @theblackquill5921
      @theblackquill5921 7 หลายเดือนก่อน +35

      go with the flow

    • @MikeMonji
      @MikeMonji 7 หลายเดือนก่อน

      @@theblackquill5921 am sure TypeScript will "render" flow useless

    • @victor38542
      @victor38542 7 หลายเดือนก่อน

      @@theblackquill5921 not my type

    • @soyitiel
      @soyitiel 7 หลายเดือนก่อน +18

      just don't get too hooked on it

    • @R0cky0
      @R0cky0 7 หลายเดือนก่อน +6

      Let's all remix!

  • @gavr_sas
    @gavr_sas 7 หลายเดือนก่อน +55

    Btw there is rescript, that has the same type system as Flow (H-M type inference, sound)

    • @Nellak2011
      @Nellak2011 7 หลายเดือนก่อน

      Exactly!

    • @SamualN
      @SamualN 7 หลายเดือนก่อน +3

      hindley-milner my beloved

    • @NamanGoel34
      @NamanGoel34 7 หลายเดือนก่อน

      It’s not the same type system. It’s a Hindley-Milner type system. It’s safer but also much more constrained. No true unions for example.

    • @_trepz
      @_trepz 7 หลายเดือนก่อน +2

      Rescript was the thing that convinced me to try react (when it was ReasonML+ReasonReact), it's just a javascript skin for OCaml with nice react bindings, was enjoyable to write but I don't know why they didn't go in on it harder. I remember reading they were refactoring the messenger frontend into it, but then not much since then.

  • @ryry79261
    @ryry79261 7 หลายเดือนก่อน +2

    It's so nice to have this information explained quickly, concisely, without too much decoration. I've been in front end over a decade now, and I'm annoyed I haven't found this channel sooner.

    • @happyjohn1656
      @happyjohn1656 7 หลายเดือนก่อน +2

      All he's doing is reading the article lol

    • @ryry79261
      @ryry79261 7 หลายเดือนก่อน +1

      @@happyjohn1656 and talking around the points of the article with context.

  • @PhilipAlexanderHassialis
    @PhilipAlexanderHassialis 7 หลายเดือนก่อน +35

    Typescript is a general purpose language that transpiles to JS. It's not made (nor should it) obey the whims of a specific community or the perceived needs of any library, however popular it is. Also also, "I want this, I want this now", sure, move fast and break things but we are now past a certain point of maturity in frontend development, where React and Typescript are the Java of frontend. You have to move carefully in very small very unobtrusive steps.

    • @angeloceccato
      @angeloceccato 7 หลายเดือนก่อน

      Then, Typescript is not React... flow yes....

    • @benheidemann3836
      @benheidemann3836 7 หลายเดือนก่อน

      The latter point is more true of TypeScript than React. React is very replaceable, TypeScript (currently) has no real competition.

    • @benheidemann3836
      @benheidemann3836 7 หลายเดือนก่อน +1

      What would you think about upstreaming something like ts-patch to allow frameworks to move fast and add the language features they need on top of typescript without impacting TS?

  • @farzadmf
    @farzadmf 7 หลายเดือนก่อน +49

    I personally think that Typescript helped React have more momentum, and the nice thing about React is (was?) that you could use a "normal" language you already know to work with it. If it goes with the route of a custom language, then it becomes a burden to work with it.

    • @eldarshamukhamedov4521
      @eldarshamukhamedov4521 7 หลายเดือนก่อน +9

      React already heavily relies on JSX, which is either a different language, or an extension to JS, depending on how you look at it. Facebook experimenting with JS syntax is not new

    • @deadchannel8431
      @deadchannel8431 7 หลายเดือนก่อน +7

      It just gives you better linting. The new syntax is like two extra keywords

    • @xorlop
      @xorlop 7 หลายเดือนก่อน

      @@deadchannel8431 plus new rules for how you call and use the function… you now have to context and know that this component keyword pre-processes your props and turns it into an object. I am not sure *another* way to call functions is a good idea, especially when it is not clear that this component keyword is doing all that magic.

    • @dashingammar9747
      @dashingammar9747 7 หลายเดือนก่อน

      Jsx is just like html​@@eldarshamukhamedov4521

    • @d3fau1thmph
      @d3fau1thmph 7 หลายเดือนก่อน +2

      GOOD! Fewer people will use this crap.

  • @hecate6834
    @hecate6834 7 หลายเดือนก่อน +10

    Didn't they already do that before with ReasonML or ReScript don't remember, might have just been the guy who made React not sure

  • @user-qq7yc1qp8z
    @user-qq7yc1qp8z 7 หลายเดือนก่อน +49

    I've been working for a 5 years now, on a front end it seems like we have 10 new different ways to do the same fucking thing each year. That's why I work as a backend engineer now, I'm tired to learn new framework every half a year.

    • @spicepirate
      @spicepirate 7 หลายเดือนก่อน +3

      you mean learn new framework every two months

    • @SamualN
      @SamualN 7 หลายเดือนก่อน +10

      literally every industry has this "issue". you will not escape this "problem" by switching to backend. it's not even a problem. nobody's asking you to learn every new framework. employers to this day are still asking for php and python experience.

    • @fionnbracken
      @fionnbracken 7 หลายเดือนก่อน

      Unless you work at Facebook you don't need to learn this.

    • @cyrus01337
      @cyrus01337 7 หลายเดือนก่อน

      Do you, just know you were never forced into it.

    • @xn--b81a
      @xn--b81a 7 หลายเดือนก่อน +1

      you just said it. "we have 10 different ways to do the same". you just need one out of the ten. you are not forced to use every new and shiny tech 🙄

  • @NestorCustodio
    @NestorCustodio 7 หลายเดือนก่อน +26

    When your framework is *so* convoluted and requires *so* much code to get working that you end up creating *two whole languages* to make it more palatable. 🤦

    • @soyitiel
      @soyitiel 7 หลายเดือนก่อน +1

      asm & C?

    • @saintgalgo
      @saintgalgo 7 หลายเดือนก่อน +1

      this is such a weird thing to complain about. most frameworks have some kind of dsl

    • @NestorCustodio
      @NestorCustodio 7 หลายเดือนก่อน

      @@saintgalgo That's fair, but not all frameworks that introduce a DSL do so in a way that requires an intermediate transpilation step. Many just leverage the already existing syntax to create helpers and/or abstractions without turning your code into something else entirely.

  • @keithjohnson6510
    @keithjohnson6510 7 หลายเดือนก่อน +4

    Someone in your chat log said "What if you want to use prop type as a whole?"..
    Your response was, but it's not something you do a lot.. But it's still very handy-> things like -> `ColorProp`, `DatasourceProps`, very handy to keep components consistent.
    eg. props: ColorProps & DatasourceProps. For very large apps having consistent prop types & names is very useful. I just destructure the props on the first line, const {color, datasource} = props; to save doing "props.color" etc, also having props is handy for prop drilling anyway, (but I try to avoid, if they get deep).

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      I think that props.color is more readable, because in longer components you know that props.color is from parent

    • @adtc
      @adtc 7 หลายเดือนก่อน

      @@untlsn It shouldn't be necessary to know whether `color` comes from parent, or from somewhere else (like a data fetch), or it's a local variable. The code of the component should behave the same regardless of the source of its value. It's also much easier to refactor when you want to change the source.

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      @@adtc I tell it from my experience. When I see wrong data on page and >{props.someValue}< in code, I know that issue is not in this component but in parent immediately

    • @keithjohnson6510
      @keithjohnson6510 7 หลายเดือนก่อน

      @@untlsn Object destructuring , or any other code shortcuts do indeed need to be used with care. Sometimes like you say that extra dot notation can give extra context, as a coder that's something you need to decide.

  • @xorlop
    @xorlop 7 หลายเดือนก่อน +2

    one of the advantages of the prop-based methods was that order does not matter. now, it looks like order might matter, so that kind of sucks

    • @DubiousNachos
      @DubiousNachos 7 หลายเดือนก่อน +3

      From what I can tell, the order still doesn't matter, but the fact that things are basically the same just isn't obvious
      When you have a component declaration, you pass the arguments in like traditional order-based arguments for functions, but that gets compiled down to an object and name-based arguments/props
      I think it's a really bad idea. React devs are already used to doing things one way, so to not only break from that, but also add ambiguity around how the declaration even works isn't worth saving a handful of characters

  • @gnaarW
    @gnaarW 7 หลายเดือนก่อน +70

    seeing as Facebook tabs regularly take >2gigs of RAM I shall skip this video. thanks.

    • @hoaisan9540
      @hoaisan9540 7 หลายเดือนก่อน +8

      and it freezes every time until you decide to reload the page, huge downfall since they introduced e2e encrypted messages

    • @chervilious
      @chervilious 7 หลายเดือนก่อน +5

      How is it 2GB? I haven't opened facebook in a while but it only takes 36.7MB even after opening multiple chat and scrolling down a bit. A fresh youtube page use 219MB and this youtube as of this writing takes 500+ MB

    • @TheGusMP
      @TheGusMP 7 หลายเดือนก่อน

      Facebook uses PHP

    • @korigamik
      @korigamik 7 หลายเดือนก่อน +4

      WhatsApp web is shit

    • @soyitiel
      @soyitiel 7 หลายเดือนก่อน

      ​@@chervilious Sometimes I want to rewatch a video I watched some weeks ago but can't remember how it's called so I look for it on my history and past around the 1 month mark the tab breaks. Last time I checked, it took multiple GBs

  • @gustavbw
    @gustavbw 7 หลายเดือนก่อน +1

    5:50 ->, thats y you always define an interface so that you can break it out like this "export default function HomeScreen({var1, var2, var3}: INTERFACE)" and make it so much nicer

  • @lunarwitch1967
    @lunarwitch1967 6 หลายเดือนก่อน

    funny thing is that the recommended way of starting with react is by using a framework built on top of it like nextjs, yet there's not a word about flow in next's docs

  • @reeceward5573
    @reeceward5573 7 หลายเดือนก่อน +13

    I don't think TypeScript should include it BUT it would be cool if you could "extend" the compiler with these features

    • @luciascarlet
      @luciascarlet 7 หลายเดือนก่อน +1

      agreed; that'd also be immensely helpful for other frameworks that may want to introduce convenient syntax. TypeScript itself should remain general-purpose

    • @collinoly
      @collinoly 7 หลายเดือนก่อน

      It would be cool. But that sounds extremely difficult if not impossible

    • @reeceward5573
      @reeceward5573 7 หลายเดือนก่อน

      @@collinoly babel exists

    • @untlsn
      @untlsn 7 หลายเดือนก่อน +1

      I think that native named args would be nice in typescript itself

    • @izzei-1614
      @izzei-1614 6 หลายเดือนก่อน

      yeah and we will get React TS, Vue TS, Angular TS which will be different languages

  • @AdamM
    @AdamM 7 หลายเดือนก่อน +6

    Big problem with Flow is searching up anything about it. What a horrible name for SEO.

    • @HappyCheeryChap
      @HappyCheeryChap 7 หลายเดือนก่อน +5

      I'm constantly amazed at the poor names chosen re searchability for all software and libs etc. surprising how little thought people seem to put into that.
      "Go" was especially ridiculous, given it came from a Google employee.

    • @AdamM
      @AdamM 7 หลายเดือนก่อน

      @@HappyCheeryChap at least Go you can search Golang and get good results.

    • @anon_y_mousse
      @anon_y_mousse 7 หลายเดือนก่อน +2

      @@HappyCheeryChap Only makes it worse that a Go language had already existed before they created theirs too. The first Go developer tried to sue Google and because his was more of a DSL he lost, but I wish he had won and they'd used another name.

  • @CarlosEstebanLopezJaramillo
    @CarlosEstebanLopezJaramillo 7 หลายเดือนก่อน

    The props thing is more tedious than you imagine, in Nrwl Nx, for some tools like StoryBook you need the props to be named "props", otherwise the tools can't find it and extract the props interface to generate StoryBook boilerplate based on that component, so in Nrwl Nx you need to destructure props inside the function body.

  • @enesmalikterzi7086
    @enesmalikterzi7086 7 หลายเดือนก่อน +1

    we should have stop at two way binding.

  • @thkhabhaii2217
    @thkhabhaii2217 7 หลายเดือนก่อน +4

    Fun fact. No matter how many frameworks or languages are created for writing clean code and easy to read code most of the startups I worked for write shitty code that is disgusting and very hard to understand. Doing stupid things such aa declaring multiple components in one fuckin componets, creating context with fuckin createElement , no seperation of concerns putting everything in one big fuckin .js file , not following proper folder structure , horrible variable naming, hooks, components and the list goes on. Frontend is pain in the ass especially if you work for a shitty company that pays bare minimum to survive. 😪

    • @CIBI
      @CIBI 7 หลายเดือนก่อน +3

      I agree buddy i accidentally opened the js file in my office it's larger than 30k lines(angular) ...

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      Many components in one file is not bad when components are small and connected (e.g component and it's wrapper)
      But yes when file have over 200 lines we should split it

    • @thkhabhaii2217
      @thkhabhaii2217 7 หลายเดือนก่อน +1

      @@untlsn That's acceptable but they put all related components in one place making it big and hard to understand.

    • @lifespell-omega
      @lifespell-omega 7 หลายเดือนก่อน +2

      the issue is that there are too many ways to do things in javascript. i'm not a fan of elm, but we need a new language like that. where the language is designed around a specific pattern and also specifically designed to be used to build ui's. there are also too many dependencies and tooling you need to do anything in javascript. typescript is closer to a linter than a statically typed language. the whole ecosystem is like a band aid that's barely holding together. you can feel the clunkiness.

    • @thkhabhaii2217
      @thkhabhaii2217 7 หลายเดือนก่อน

      @@lifespell-omega Yes. But the ecosystem is too vast to get replaced. So many are dependent on js and we cannot simply replace it soon. Typescript is more like a linter , you are definitely correct on this one. But companies can simply implement good practices and avoid writing shitty code , which I think even if we create a new language they wont implement, they just want to get things done.

  • @MrGarkin
    @MrGarkin 7 หลายเดือนก่อน +1

    Are ts compiler plugins (a la babeljs) a thing in current timeline?
    I remember there was couple issues about it. Mostly because of stalled Ecmascript committee features.
    This would fit like a glove.

  • @fricze
    @fricze 7 หลายเดือนก่อน +3

    If you're at the level of creating new language just for React, there's already ClojureScript, Elm, PureScript, and ReasonML. Creating another JavaScript-but-not-exactly just for React is silly. It also shows that Reacts' model, while cool, has the issue of JavaScript not being the best language to implement it.

    • @cyrus01337
      @cyrus01337 7 หลายเดือนก่อน +1

      I wouldn't say JS is not the best language for React despite the many pitfalls in the language, it's more that React seems to be doing too much. Originally it was great to have HTML and JS in one file (and if you use Tailwind you get the whole package), now it's bastardised itself with great additions in theory that provide far too much mental overhead even when adjusting to it incrementally, and all forbid you do any of this in a large project.
      The problem seems to be less with the language and more with the framework, JS is already fast and React was fine since function components. Additions to this simply haevn't been helpful, though what this video covers is definitely implicitly useful for the ecosystem.

    • @fricze
      @fricze 7 หลายเดือนก่อน +2

      @@cyrus01337 Well, I still think it's not the bet language for React model and that's why React is fighting with JS.
      JS doesn't have immutable data (while Elm, ClojureScript, ReasonML, and PureScript do) so whole VDOM comparison process is not as performant as it could be with immutable data. JS doesn't have Algebraic Effects (or similar advanced flow-control primitives), so hooks are implemented in a "hacky" way, with special "rules of hooks" that you need to adhere to if you don't want to blow up your application. They look like functions but they're not functions. They work only in the React world. They're implemented via functions only because JS lacks better primitives for them.
      That's why React team is building compiler that is supposed to work out where to put useMemo and useCallback, etc... That's a sign that language they're using is not giving them tools they need.

    • @tuananhdo1870
      @tuananhdo1870 7 หลายเดือนก่อน

      Sure. Javascript is not the best. THats why we have typesscripy and its pretty good

    • @tuananhdo1870
      @tuananhdo1870 7 หลายเดือนก่อน

      Buy javascript is still better than some languages like java php... plenty good

  • @danieljanjanocha7178
    @danieljanjanocha7178 7 หลายเดือนก่อน

    7:39 it looks like comparing function that takes object as only parametr vs function that takes multiple parameters. What if I want to pass 3 parameters that are all strings? Imo the first one is always easier to work with because when invoking the function (or rendering the component) I just open curly braces and see autocomplete and see what qre the props names instead of thinking "should I put userId, transactionId or other string first?"

  • @MrGarkin
    @MrGarkin 7 หลายเดือนก่อน

    Every framework could use domain specific language extension features.
    Expecially fullstack, something like TS extensions for NextJS.

  • @matheusmacielleao5570
    @matheusmacielleao5570 7 หลายเดือนก่อน +3

    sorry htmx pilled here

  • @theblackquill5921
    @theblackquill5921 7 หลายเดือนก่อน +1

    "I want this in typescript and I want it in typescript now"

    • @theblackquill5921
      @theblackquill5921 7 หลายเดือนก่อน

      also just convince them by giving them a cookie :)

  • @Juloass
    @Juloass 7 หลายเดือนก่อน +3

    Lets replace export default function !! Okay .. what about .. export default component ?
    Yeah we really needed to keep that public static void main(String[] args) type of stuff

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      exp def fn!

  • @brennan123
    @brennan123 7 หลายเดือนก่อน

    Ugh, you got me with the "clickbait" again. lol
    I was hoping it was something like Reason ML.

  • @jondoe79
    @jondoe79 7 หลายเดือนก่อน

    React is all about hype every quarter. We should name react as Hype Framework

  • @cornheadahh
    @cornheadahh 7 หลายเดือนก่อน +2

    I'm kind of tired of the youtube thumbnail face, I guess on paper it does boost engagement though

    • @deadchannel8431
      @deadchannel8431 7 หลายเดือนก่อน +1

      It honestly makes me not want to watch it lol

  • @Jamiered18
    @Jamiered18 7 หลายเดือนก่อน

    Pretty cool. Certainly cuts down on the excess syntax and is clearer. The `renders` keyword is something sorely missing. Though the rest of it is pretty much already handled by the rules of React ESLint package elsewhere

  • @MrMassaraksh
    @MrMassaraksh 7 หลายเดือนก่อน

    And no one still fixed issue, when you open fb at mobile safari, through the some app, it throws an alert at your face.

  • @fwsuperhero1
    @fwsuperhero1 7 หลายเดือนก่อน

    Has anyone tried Flow and Rescript in recent months and can you compare?

  • @benheidemann3836
    @benheidemann3836 7 หลายเดือนก่อน

    I don’t think TypeScript should be adding React specific syntax. However, it would be really interesting to see if something like ts-patch could be upstreamed into TS. Technically this isn’t meant to support new syntax, but in practice as long as it can be parsed into an AST, it would be possible to do so. This would also allow implementing “real” typescript diagnostics for react (or any other framework) errors. The issue here though is that it leaves behind alternative compilers, as they all use different AST representations under the hood so it would be very difficult to implement this.

  • @blessedpigeon6304
    @blessedpigeon6304 7 หลายเดือนก่อน

    9:20 it is very common when building stuff like a ui kit for example

  • @FlorianWendelborn
    @FlorianWendelborn 7 หลายเดือนก่อน +1

    I hope this never gets into TypeScript, it’s too framework-specific. It would be great if there’d be some sort of more web standards based alternative in TS though

  • @zenpool
    @zenpool 7 หลายเดือนก่อน

    can we have a typescript syntax plugins just like babel had with js

  • @kobibr9362
    @kobibr9362 7 หลายเดือนก่อน +2

    Facebook is slower everyday 😅

  • @joshuathomasbird
    @joshuathomasbird 6 หลายเดือนก่อน

    i could see like an swc plugin or an esbuild plugin to do this

  • @junit1606
    @junit1606 7 หลายเดือนก่อน +4

    More code rewrite? no thanks

  • @kuhluhOG
    @kuhluhOG 6 หลายเดือนก่อน

    This kinda feels like Meta Build Systems (or Build System Generators) like CMake or Meson.
    Trying to solve the problem at the wrong level.

  • @adtc
    @adtc 7 หลายเดือนก่อน

    What about stuff that's not props, like forwardRef? How would you pass that in?

  • @Awesomo4000
    @Awesomo4000 7 หลายเดือนก่อน +1

    I haven't used React in a while. Every time I hear something about React it sounds like the "meta" changed, which makes it very unappealing.

  • @JimmayVV
    @JimmayVV 7 หลายเดือนก่อน

    I just want these features to come to TypeScript

  • @SpeakChinglish
    @SpeakChinglish 7 หลายเดือนก่อน +2

    This is the equivalent of seeing a todo app then recreating it from scratch just to add a small improvement on top.

  • @lawrencejob
    @lawrencejob 7 หลายเดือนก่อน

    Can you just use @hook and @component in TS if that's what you want?

  • @nekogami87
    @nekogami87 7 หลายเดือนก่อน +1

    Mandatory XKCD comic strip number 927 :D (looks like a full link auto delete the comments :( )
    edit: before anyone gets buthurt, that's a joke, it just made me think of the meme of the "new shiny js tooling of the week"

    • @anon_y_mousse
      @anon_y_mousse 7 หลายเดือนก่อน

      I don't see how anyone could disagree. It really is what they do with JavaScript and every offshoot thereof.

  • @ArnarF
    @ArnarF 6 หลายเดือนก่อน

    it could be done in the same way svelte handles TS perhaps?

  • @jfftck
    @jfftck 7 หลายเดือนก่อน

    JavaScript should add a component keyword as syntactic sugar to web components, maybe that would reduce the clunky nature and improve adoption.

  • @Nellak2011
    @Nellak2011 7 หลายเดือนก่อน

    I haven't looked into this at all, so take what I say with a grain of salt.
    It appears that Flow is different to ReScript due to the render types, but is otherwise mostly the same idea as ReScript, but with additional React Linting and a new syntax.
    Correct me if I am wrong in the comments.

  • @geooot
    @geooot 7 หลายเดือนก่อน

    we ain't beating the allegations buds

  • @pasizdobrekuce
    @pasizdobrekuce 7 หลายเดือนก่อน

    One can do crazy (read nonsense) stuff when unlimited resources are available.

  • @GrumpyGrebo
    @GrumpyGrebo 7 หลายเดือนก่อน +7

    How many frameworks and layers of abstraction can you possibly need just to create the same UI/UX that other websites already have? Frontend is such a deadweight sector.

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      How many layers of abstraction and rules will the meta add before it admits that React is a framework

    • @GrumpyGrebo
      @GrumpyGrebo 7 หลายเดือนก่อน

      @untlsn Show me a Web fronted that is not written in Javascript HTML and CSS. React is a framework, as is anything which takes away the ability to actually produce the end result without the intermediate tools.

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      @@GrumpyGrebo i know, but many peoples say that react is just a library

    • @GrumpyGrebo
      @GrumpyGrebo 7 หลายเดือนก่อน

      @untlsn It's a fun argument, and a trick. React is a domain specific language distributed as a library, with best practices and use patterns that make it more of a framework than comparable libraries. But it is not a full framework and can be integrated into full frameworks ie Next.js. You can just use React in a basic standalone HTML file, so it is technically a library. But you will be almost definitely be carving out the presentation layer of your application and building components which consume props using JSX, data bound to providers, component hooks, etc.
      React is a library, building in React makes it a framework. Infinite argument.

  • @tokiomutex4148
    @tokiomutex4148 7 หลายเดือนก่อน

    What do you think of ReasonML?

  • @kasper_573
    @kasper_573 7 หลายเดือนก่อน

    I think it would be unwise to add react specific features to typescript. If a framework wants its own DSL it should take ownership of that DSL and/or compiler, like solidsj or svelte

  • @asdrian-sykes
    @asdrian-sykes 7 หลายเดือนก่อน +1

    13:33 "Refs are getting an overhaul soon"
    I'm out of the loop, what's the overhaul?

    • @hmerritt
      @hmerritt 7 หลายเดือนก่อน

      React 19 (not yet released) removes the need for forwardref, and just makes ref a regular prop

    • @asdrian-sykes
      @asdrian-sykes 7 หลายเดือนก่อน

      @@hmerritt Oh that's neat, thanks for the info!

  • @fifty6737
    @fifty6737 7 หลายเดือนก่อน

    im now interested in flow

  • @Wielorybkek
    @Wielorybkek 7 หลายเดือนก่อน

    wow, writing a domain specific language looks nicer than adapting to an existing standard. shocker.

  • @abhayvashokan8675
    @abhayvashokan8675 7 หลายเดือนก่อน

    Which is Theo's VSCode theme?

  • @shadowpenguin3482
    @shadowpenguin3482 7 หลายเดือนก่อน

    Shouldn’t it be possible to implement this via annotations? I know typescript supports annotations eg in angular

  • @AndrewTaylorPhD
    @AndrewTaylorPhD 7 หลายเดือนก่อน

    I'm in favour of this. I didn't think i would be because generally I'm pro "just copying the files onto a server and calling it a build process", but I think if you've already got JSX then you might as well commit to the bit and make a whole new language, and this seems nice. But yes, not switching to flow over this 🙃

  • @shadeblackwolf1508
    @shadeblackwolf1508 6 หลายเดือนก่อน

    Given that the whole JS ecosystem is transpilers, you can create a new language variant that has this and transpiles to standard TS.

  • @ktappdev
    @ktappdev 7 หลายเดือนก่อน

    Export default const?

  • @joshuathomasbird
    @joshuathomasbird 6 หลายเดือนก่อน

    honestly that props thing is kinda wierd. In normal fns params are positional, but here they are not.
    Would have preferred to keep the curly braces to keep those semantics

  • @bellazook2334
    @bellazook2334 7 หลายเดือนก่อน

    Why not implement it in React? use_ for hooks, comp_ for components...

  • @AbstruseJoker
    @AbstruseJoker 7 หลายเดือนก่อน

    Why not just reserve this syntax to tsx only?

  • @HikaruAkitsuki
    @HikaruAkitsuki 7 หลายเดือนก่อน

    The only wish that React have is to get rid imports, it have only one job but it doesn't mean it should pile up on your source files.

    • @keithjohnson6510
      @keithjohnson6510 7 หลายเดือนก่อน +1

      "get rid import", what do you mean here?, if it's just `import * as React from "react"` , that's already possible, if you mean for all other imports, then no that's not a good idea.

  • @thepetesmith
    @thepetesmith 7 หลายเดือนก่อน +1

    If you use flow, I am sorry for you.

  • @Sindoku
    @Sindoku 7 หลายเดือนก่อน

    Want it in TS and I want it NOW! lol.

  • @adtc
    @adtc 7 หลายเดือนก่อน

    Um, why are you looking to the side and not at the camera? Lol

  • @untlsn
    @untlsn 7 หลายเดือนก่อน

    React should embrace own files like .vue, .svelte at this point

  • @miiky976
    @miiky976 7 หลายเดือนก่อน

    it looks like compose .-.

  • @hacktor_92
    @hacktor_92 7 หลายเดือนก่อน

    sooo... basically, flow is a DSL-ish on top of JS for React? just like Vala is built on top of GObject

  • @FrostsorrowGaming
    @FrostsorrowGaming 7 หลายเดือนก่อน

    For the love of all that is holy can we please please please use dark mode for reading web pages like this... you light mode users are destroying the eyes of so many of us night dwellers..

  • @vorant94
    @vorant94 7 หลายเดือนก่อน

    I don’t want typescript to bang on react features… typescript isn’t about react, but javascript. React already influences the js world enough so devs dunk on classes, mutable data structures and so on

  • @codeChuck
    @codeChuck 7 หลายเดือนก่อน

    Theo, are you saying even authors of the blog do not understand what some eslint rules are doing in React? What? They supposed to be the authors? No?
    They are the source of truth?

  • @williamlim672
    @williamlim672 7 หลายเดือนก่อน

    Will decorator be a good option?

    • @benheidemann3836
      @benheidemann3836 7 หลายเดือนก่อน

      Decorators don’t support functions other than methods at present. But yeah, they could be used as annotations to help a linter understand your code. They won’t add new syntax though so only would help with a very narrow subset of what was discussed here.

  • @additionaddict5524
    @additionaddict5524 7 หลายเดือนก่อน

    7:03 something on your mind Theo?

    • @pablomayobre
      @pablomayobre 7 หลายเดือนก่อน +1

      Flutter is taking Theos mind lol

  • @jonniem
    @jonniem 7 หลายเดือนก่อน

    is this the new java….

  • @yuryzhuravlev2312
    @yuryzhuravlev2312 7 หลายเดือนก่อน

    yeah, they have the same issue as Svelte with TS adoption. But I suppose Svelte anyway much simpler and better than React.

  • @AlexanderBorshak
    @AlexanderBorshak 7 หลายเดือนก่อน +5

    React HAD a great idea that UI = f(state), but somewhere FB took a wrong turn. Will vote for Vue.

    • @omri9325
      @omri9325 7 หลายเดือนก่อน +3

      Great idea in theory, bad in practice.
      It's too difficult to make immutability performant

    • @DubiousNachos
      @DubiousNachos 7 หลายเดือนก่อน

      ​​@@omri9325Immutability is fine - proper functional programming languages handle it no problem, and can have really good performance
      The problem is enforcing immutability in a cross-paradigm language that wasn't built for immutability from the beginning (JavaScript). JS can't do any fancy optimizations or provide any niceties around structural sharing because it can't safely make any assumptions about what will or won't happen to the data

    • @untlsn
      @untlsn 7 หลายเดือนก่อน

      Prevously: UI = f(state)
      Now: UI = f(state) { backend_stuff, user interaction, forms_control }

  • @thisweekinreact
    @thisweekinreact 7 หลายเดือนก่อน

    I want this now!

  • @__christopher__
    @__christopher__ 7 หลายเดือนก่อน

    What about instead fixing React to not have those restrictions in the first place? Then you'd not need any language features to enforce them.

  • @carloslfu
    @carloslfu 7 หลายเดือนก่อน

    React becomes Flutter ...
    jk, that'd be the wrong take. Or would it? 👀

  • @maximus1172
    @maximus1172 7 หลายเดือนก่อน +4

    Leave Javascript folks, it would be for the best

  • @WatashiwaWatashi-zw7hy
    @WatashiwaWatashi-zw7hy 7 หลายเดือนก่อน

    sorry so we don't need to learn Typescript anymore ya?

  • @auroralong5437
    @auroralong5437 7 หลายเดือนก่อน

    shows how well reasonml went :/

  • @jricardoprog
    @jricardoprog 7 หลายเดือนก่อน +1

    I'm glad I don't use react, lol

    • @deadchannel8431
      @deadchannel8431 7 หลายเดือนก่อน

      Glad I do, I have a job 😎

  • @Pi7on
    @Pi7on 7 หลายเดือนก่อน +2

    Stop

  • @matteo.veraldi
    @matteo.veraldi 7 หลายเดือนก่อน

    React is wild these days

  • @stugeh
    @stugeh 7 หลายเดือนก่อน

    Ngl, I hate this. Adding more and more layers of abstraction and compile steps is getting ridiculous at this point. If it's so difficult to write react that you need to write a whole new language to deal with it better maybe react isn't a good abstraction in the first place.

  • @FilipCordas
    @FilipCordas 7 หลายเดือนก่อน +1

    react is just so bad, they are rewriting the same crap again why people still use this is beyond me. We removed a bunch of boilerplate sure react is just boilerplate no wonder. of course, no update path for any of it and everything old will be depreciated again. why can't this crap framework just die.

  • @sirrobinofloxley7156
    @sirrobinofloxley7156 7 หลายเดือนก่อน

    Yet another devchan not using dark... How do you guys even see?

  • @DhananjayNaik
    @DhananjayNaik 7 หลายเดือนก่อน

    who tf uses flow?
    I'm sad that somewhere a dev is working on developing flow features.

  • @sodium7554
    @sodium7554 7 หลายเดือนก่อน +1

    ... or you just could Angular and have something that allows clean code out of the box?

  • @n4bb12
    @n4bb12 7 หลายเดือนก่อน +1

    Facepalm

  • @fernandosalazar8814
    @fernandosalazar8814 7 หลายเดือนก่อน

    Dogfooding the rules of react

  • @ahmedivy
    @ahmedivy 7 หลายเดือนก่อน +1

    This is the most stupid thing by meta

  • @Kampouse
    @Kampouse 7 หลายเดือนก่อน

    guy talk about a language about react but does not talk about rescript are you serious