ReactJS Tutorial - 8 - JSX

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • 📘 Courses - learn.codevolu...
    💖 Support UPI - support.codevo...
    💖 Support PayPal - www.paypal.me/...
    💾 Github - github.com/gop...
    📱 Follow Codevolution
    + Twitter - / codevolutionweb
    + Facebook - / codevolutionweb
    📫 Business - codevolution.business@gmail.com
    JavaScript XML (JSX) is an extension to the JavaScript language syntax. With React, it's an extension to write XML-like code for
    elements and components. And just like XML, JSX tags have a tag name, attributes, and children.

Комментарии • 201

  • @Codevolution
    @Codevolution  5 лет назад +52

    React Fire - github.com/facebook/react/issues/13525

  • @PadmanabhRudrawar
    @PadmanabhRudrawar 4 месяца назад +3

    I am truly grateful that you have created these videos. These videos are relevant even in 2024, i.e. 5 years since its inception. On top of that, these are all free. I wish to see each and every video related to React as my current job requires me to be good in React. I wish to do something for Codevolution as a token of gratitude. Let me know if there is a way to contribute 😇

  • @suzsg6169
    @suzsg6169 7 месяцев назад +7

    This is a bit outdated explanation. JSX no longer requires importing React and translation works differently under the hood. New translation: _jsx('h1', { children: 'Hello world' }); instead of React.createElement('h1', null, 'Hello world');

  • @viveks2619
    @viveks2619 3 года назад +33

    Instead of nesting the Createelement function, 'return React.createElement('div',null,Hello Again)', This works perfectly fine.

    • @total_breathing
      @total_breathing 3 года назад +5

      React has evolved

    • @josk8936
      @josk8936 Год назад +3

      arent you using just more jsx inside the child paramenter?

    • @pallavimahanta519
      @pallavimahanta519 Год назад

      @@total_breathing hey should i follow the whole playlist in 2023 .curreantly i have not started reactjs . Iam searching for a good playlist .can u suggest me

    • @faizanahmed9304
      @faizanahmed9304 Год назад +2

      ​@@pallavimahanta519yes you can i know its quite older but the basic fundamentals are same

    • @Santhosh-1217
      @Santhosh-1217 Год назад

      You use html tag in return that is jsx
      He teach without jsx

  • @krisssachintha
    @krisssachintha 4 года назад +9

    Super understanding tutorials, now i like to work with react js, thanks for good content

  • @visweswarbk7611
    @visweswarbk7611 2 года назад

    Excellent presentation !

  • @weslolo1074
    @weslolo1074 2 года назад

    glad jsx exists

  • @gopalakrishnamurthy7862
    @gopalakrishnamurthy7862 4 года назад

    Superb explanation I loved it

  • @rabiehaed
    @rabiehaed 4 года назад

    Excellent explanation, Thanks

  • @smilybhanu7779
    @smilybhanu7779 4 года назад

    Good..great tutorials

  • @nadicadizdarevic2835
    @nadicadizdarevic2835 2 года назад

    🙂Thanks.

  • @karteekkosaraju218
    @karteekkosaraju218 2 года назад +2

    Hello Vishwas,
    please include the source files too..that way , it's a great help
    Thanks in Advance

  • @sandeshdeshmukh2136
    @sandeshdeshmukh2136 5 лет назад

    thank you so much

  • @alvinrobert3927
    @alvinrobert3927 4 года назад

    I'm one fellowing u to all the videos to learn react .js

  • @vasantht3379
    @vasantht3379 5 лет назад

    Thanks boss

  • @rahulnag9582
    @rahulnag9582 5 лет назад +1

    hi sir,
    if we write the Hello function as function Hello() {
    }
    the it will be a JSX or not ?

    • @yogibaba6008
      @yogibaba6008 5 лет назад +1

      Arrow function or ES5 function has nothing to do with JSX. Basically what you are returning from your function is JSX . You can also return JSX from class based component.

  • @guleye
    @guleye 4 года назад

    Super Super Super

  • @YusanTRusli
    @YusanTRusli 3 года назад

    Is there any tutorials for Svelte?

  • @JYOTSNA018
    @JYOTSNA018 4 года назад +4

    using React.createElement though returns a line here, but can be highly tedious when it comes to entire page, and the same is easily achieved by functions(greet) why then is it even used?

    • @backseatgaming9087
      @backseatgaming9087 3 года назад +1

      It is advantagous if you want to use XML later on to manipulate the DOM tree

  • @ngsuraj
    @ngsuraj 4 года назад

    Is it not mandatory to use .jsx extension when we use jsx in a react file?

  • @codingtriangle
    @codingtriangle 2 года назад

    By now I think classname has changed to class

  • @bikashbhandari5608
    @bikashbhandari5608 5 лет назад

    How many times we have to use react.createElement if there is many child inside div?

    • @SalmanMKC
      @SalmanMKC 4 года назад

      That's for demonstration purposes I guess, it's much easier to use jsx and no need to have to learn the js implementation! :)

  • @lemon_maho
    @lemon_maho 2 года назад

    can I watch this in 2022?

  • @ailton.duarte
    @ailton.duarte 4 года назад +1

    without jsx is boring

  • @nivethababu6130
    @nivethababu6130 3 года назад

    React.createElement("div",null,React.createElement("h1",{name:"greetings"},"Hello World"),React.createElement("p",null)); . please help me convert this to jsx

  • @maujmishra4098
    @maujmishra4098 3 года назад +1

    4:11 That is not a parameter Its an Argument!

    • @killer66fly
      @killer66fly 3 года назад

      It does not matter. It is just a technical term, but we all know what it means lol....

  • @jondo-vh8tx
    @jondo-vh8tx 4 месяца назад

    im new to this but i truley struggle to even try to like it. im sorry but its so stuppid and wiered language that i just don understand why stuff must be so complicated just to print a h1

  • @pguti778
    @pguti778 3 года назад

    I had to put the speed at 2x. Much too slow.

    • @jessica-tv6ep
      @jessica-tv6ep 3 года назад

      we should understand that not all people can absorb knowledge fast

  • @dasojushiva8663
    @dasojushiva8663 3 года назад +58

    dude... I am halfway through the video and I already like the way that is being explained, though am a newbie... it was very clear to me. initially, i thought JSX pros all are like complicated things to learn... but I know there are smart people like you who made the world so beautiful.

  • @kalmi_riding
    @kalmi_riding 4 года назад +53

    So if I understand well, our previously created Welcome and Greet component returned with JSX, right?

  • @zribiahmedyassine1582
    @zribiahmedyassine1582 Год назад +3

    is this serie still usefull in 2023 @Codevolution ?

    • @kristijanlazarev
      @kristijanlazarev Год назад

      Yes, 90% of the course is basics, and is still relevant today!

  • @lakshaymangu899
    @lakshaymangu899 3 года назад +2

    This video is uploaded in Nov 2018. Can I refer this tutorial for freshly learning React JS now in Mar 2021? Please help :)

  • @chetannagar7467
    @chetannagar7467 Год назад +1

    Please confirm if it is valid at this time ?

  • @adetolasanni007
    @adetolasanni007 3 года назад +9

    Great tutor ever you took your time and energy to explain every bit of the course. Thank you so much.

  • @noahqyain7311
    @noahqyain7311 2 года назад +4

    I JUST love how enthusiastic Desi people are about their tech careers. It is kind of cute how they run to make videos and are prideful of their knowledge unlike no other culture or ethnicity in the world TBH. They are probably the most cognitive of the mediocre knowledge needed to work in technology and the pay out being greater than the required input in man hours to learning such information.

  • @smrpkrl
    @smrpkrl Год назад +1

    10:11

  • @GavinWoodthebarbarian
    @GavinWoodthebarbarian 4 года назад +2

    Forgive me for my ignorance but I cannot see how react is "better" than Angular. I prefer where my components are in their own separate structure with html js and css separated from each other. maybe we still getting to something like that down the line but so far React seems way more complex to me that Angular.

  • @rounakghosh6213
    @rounakghosh6213 2 года назад

    Although, it is none of my concern, and I know I should be concerned with only the context in your video, but still could not stop myself from saying that, your accent sounds absolutely not real. Why do you have to copy foreign accent?. Why can you not speak in your real Indian accent.?
    Nonetheless I am very much grateful with the context you are providing in your videos.

  • @Khinh-xq6lx
    @Khinh-xq6lx 12 дней назад

    if he type return React.createElement('div', null, 'Hello vishwas') the browser would still display the name but not bolded text

  • @abelm1710
    @abelm1710 3 года назад +2

    I swear JSX brings some old vibes where we were used to write php in html files.. Disgusting.
    Good tutorial though.

    • @HickoryJ
      @HickoryJ 3 года назад

      I had to do this at my job in 2020 😖

  • @FIRE_EVERYTHING
    @FIRE_EVERYTHING Год назад +1

    This tutorial is amazing, I only found it 4 years too late. Is it still relevant enough to follow?

    • @kristijanlazarev
      @kristijanlazarev Год назад

      Yes, 90% of the course is basics, and is still relevant today!

  • @uodige1
    @uodige1 Год назад +3

    another easy-to-follow tutorial, I am so glad I am improving my React skill thru these tutorials!!

  • @dhl4102
    @dhl4102 4 года назад +9

    You Rock! Such a great tutorial

  • @vinodp7508
    @vinodp7508 4 года назад +1

    below code also works properly...try it
    import React, {Component} from 'react'
    const hello = () => {
    // return (
    //
    // Hello sachin patil
    //
    // )
    return React.createElement('div',null,Hello vinod)
    }
    export default hello

    • @monchoisalive
      @monchoisalive 4 года назад

      Any idea why this code works for you, but it doesn't for Vishwas?

  • @trendy_trendy2024
    @trendy_trendy2024 4 года назад +4

    return React.createElement('div', null, Hello Vishwas )
    This works fine as we expect.
    Please let me know why dont we use this.

    • @abbasshaikh3115
      @abbasshaikh3115 4 года назад

      It's just a point of preference

    • @sunnyparmar9692
      @sunnyparmar9692 4 года назад +4

      Instead of using React.createElement and passsing three parameters, JSX is much easier to write and understand the flow of code.
      So try to use JSX for simplicity.

    • @aravindb6025
      @aravindb6025 4 года назад

      consider nesting of 8 to 10 elements inside div element which will be difficult so we prefer jsx way which is like writing html and hassle free

  • @bollywoodclassichitslyrics2242
    @bollywoodclassichitslyrics2242 5 лет назад +5

    Please upload more videos on react and react native

  • @JohnDoe-rj2kf
    @JohnDoe-rj2kf 3 года назад +2

    what is the difference between the .js or .jsx extenstion when writing the react component ?

  • @AyanKhan-rb2ie
    @AyanKhan-rb2ie 2 года назад

    An absolute beginner here , i just have one question , WHYYYYYYY react ??? Why cant i simply make these components out of basics HTML elements why do i have to write such bigggg code for a single head tag?? Why make multiple components for an application in different files , importing-exporting them, ugh it feels so useless right now! I know this isnt flop tho i maybe looking at it from a very different perspective! Anyone here who knows REACT well , can you drop some info as to how and why is REACT beind used.

    • @FatProgrammer
      @FatProgrammer 2 года назад

      because in real world, applications are way more complex and hard to manage, imagine Facebook atm uses more than 40000+ components in there development, think all them were plain js files on a single page?! how hard would it be to manage or catch a bug. Also React's reusability makes the work much easier, if you use plain Js you could copy n paste code for each thing (for example think Airbnb,) so your code would become much more lengthy. But in React we can easily call again once we write the code in a component. Just with

  • @SpiritualManish
    @SpiritualManish 3 года назад +2

    Thank You for such a nice tutorial series Vishwas. I am using react 17.0.1 and I don't need to import react in functional components.

  • @co-de-code
    @co-de-code 3 года назад +1

    Sir it's working even if I type // return React.createElement('div',null,'Hello Rohith')

  • @shloch2007
    @shloch2007 5 лет назад +5

    very much a GREAT TEACHER ................. thank you

  • @SurreyIris
    @SurreyIris 19 дней назад

    Perez Susan Young Elizabeth White Mary

  • @Antarah525
    @Antarah525 3 года назад +1

    they didn't change className to class yet I suppose

  • @kiranrajb2960
    @kiranrajb2960 20 дней назад

    hi bro can you share the ppt which you display in every videos

  • @LearnWithNoor036
    @LearnWithNoor036 Год назад +1

    I am watching your series on January 2023.Thanks for your hard work on this Course. You should teach in Udemy.

  • @KOSAMAGAMES
    @KOSAMAGAMES 3 года назад +3

    doing the second one threw me back in time.

  • @kiminomeha
    @kiminomeha 3 года назад

    Subtitles: JSX? - Chair sex!

  • @rajivkurryah6894
    @rajivkurryah6894 2 года назад

    const Hello = () =>{
    return React.createElement('div',null,Hello JS)
    }

  • @whynot-vq2ly
    @whynot-vq2ly 4 года назад +6

    are we going to make something else then greeting Vishwas in the coming tutorials ? :D
    in the meanwhile I find the tutorials amazing, thanks a lot :]

  • @FarjanaAhsan-t4i
    @FarjanaAhsan-t4i 17 дней назад

    Garcia Jessica Allen Barbara Brown Maria

  • @negros111
    @negros111 2 года назад +1

    I have problem Compiled with problems:X
    ERROR in ./src/App.js 14:43-48
    export 'Greet' (imported as 'Greet') was not found in './components/Greet' (possible exports: default) ?

  • @Sandeep_trader17
    @Sandeep_trader17 2 года назад

    Line 3:9: 'Greet' is defined but never used no-unused-vars
    Line 4:9: 'Welcome' is defined but never used no-unused-vars
    getting these error and nothing is printing on web could you help me with the same

  • @Sandy-hq2gb
    @Sandy-hq2gb 3 года назад

    return React.createElement('h1',null,'Hello Shandy')} This made me print with h1 function.

  • @uniquezay2019
    @uniquezay2019 11 месяцев назад

    Hello Vishwas, why the code didn't work as it should at 5:16 was because the Hello Vishwas was inside of a quote, I wrote it without the quote and it worked.

  • @teddyness123
    @teddyness123 Год назад

    Why did we use parenthesis for return in Hello.js, while in greet there wasn't, I'm a newbie to react

  • @RohitKatkar-yl6eo
    @RohitKatkar-yl6eo Месяц назад

    Please give notes of reactjs

  • @manikantabalaga3255
    @manikantabalaga3255 2 года назад

    In 2022 is it okAY TO learn?

  • @SimonneClearman
    @SimonneClearman 12 дней назад

    027 Greenfelder Drives

  • @100mdabrarhussain9
    @100mdabrarhussain9 3 года назад

    its give error:
    TypeError: Class extends value undefined is not a constructor or null

  • @visweswarbk7611
    @visweswarbk7611 2 года назад

    Do not see the name and introduction of tutor anywhere ....just curious to know who is doing this great presentation !

  • @riteshims
    @riteshims 4 года назад

    I am not sure whether you will reply or not but if possible please make a video on react.CloneElement(). No such helpful article is available on any tutorial site

  • @KenxszdsdraLust
    @KenxszdsdraLust 21 день назад

    8715 Glover Alley

  • @toannew
    @toannew 3 года назад +5

    6:23 js code (not jsx code)
    8:46 compare code of jsx and js.
    10:19: jsx syntax and what is going to change (className -> class)

  • @RalphThera
    @RalphThera 8 дней назад

    1399 Carlo Loop

  • @karolinalencina7121
    @karolinalencina7121 3 года назад +1

    Thank you, that was super clear! :-)

  • @rahulnag9582
    @rahulnag9582 5 лет назад +1

    using the div tag makes it a JSX or making it a cont function makes it a JSX ?

  • @nikimehta5323
    @nikimehta5323 4 года назад

    according to your tutorial i have import a jsx element but it does not show anything i have used default export also and my path in another page is also correct

  • @ravitejakambaluru1330
    @ravitejakambaluru1330 3 года назад

    @codevolution how can I write multiple class names for single elements. For examples in case of using bootstrap classes

  • @sonali2720
    @sonali2720 2 года назад

    Hi , can you please upload videos for react typescript testing using jest

  • @uodige1
    @uodige1 Год назад

    I am sorry, but how do I write "//" multiple times at once?

  • @roopsoops202
    @roopsoops202 2 года назад

    Is React.createElement still used in react 18? Newbie here!

  • @CANIHAZURDREAMSPLS
    @CANIHAZURDREAMSPLS 4 года назад +1

    This answered many questions for me! Great video!

  • @DuBoisNorman-s2w
    @DuBoisNorman-s2w 23 дня назад

    Kovacek Isle

  • @aku_11_11
    @aku_11_11 4 года назад

    Awesome tut sir, plz make tut on java script full course too sir..

  • @colindante5164
    @colindante5164 2 года назад

    With such an awesome tutorial the least I could do is subscribe. )) Thankyou for such a clear explanation. )))

  • @karthi321ful
    @karthi321ful 5 лет назад +1

    awesome tutorial series , Thanks Vishwas.. following

  • @richardmartyns7978
    @richardmartyns7978 2 года назад

    I started learning react here, hope am on the right track and there is no new changes

  • @nogafouz2174
    @nogafouz2174 2 года назад

    thanks alot

  • @MatheusPereira-nn9dj
    @MatheusPereira-nn9dj 2 года назад

    can i use emmets inside create.element to maybe nest parent div and child div??

  • @akshithaelukapalli184
    @akshithaelukapalli184 9 месяцев назад

    Will u please provide any other alternatives to solve the queries sir

  • @Zen-lz1hc
    @Zen-lz1hc 2 года назад

    Dislike :(

  • @kornkorn1699
    @kornkorn1699 9 месяцев назад

    some reason i got Uncaught runtime errors how to fix it

  • @zubaerhossain3203
    @zubaerhossain3203 2 года назад

    Super

  • @yerraguntlaharish4109
    @yerraguntlaharish4109 4 года назад

    @Codevolution sir i am seeing this series now am i good to go or are there any changes

  • @poojaguru2516
    @poojaguru2516 Год назад

    Your videos are the best ever! Glad i found your channel.

  • @gauravpant770
    @gauravpant770 3 года назад

    how your element was aligned at center and not mine ???

  • @ShabnamDeveloper
    @ShabnamDeveloper 3 года назад

    good

  • @lathagm666
    @lathagm666 11 месяцев назад

    completed 8th video. thank you 🙂

  • @riyasri7991
    @riyasri7991 2 года назад

    Why in my vscode jsx is not executing?

  • @amolsd8706
    @amolsd8706 Год назад

    you are an awesome.....
    happy learning react.