1 / 75

ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React Tutorial | Edureka

This Edureka ReactJS Tutorial For Beginners will help you in understanding the fundamentals of ReactJS and help you in building a strong foundation in React framework. Below are the topics covered in this tutorial:<br><br>1. Why ReactJS?<br>2. What Is ReactJS?<br>3. Advantages Of ReactJS<br>4. ReactJS Installation and Program<br>5. ReactJS Fundamentals

EdurekaIN
Download Presentation

ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React Tutorial | Edureka

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agenda Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  2. Why ReactJS? Why do we need ReactJS? Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  3. Why ReactJS Remember the Facebook newsfeeds before 2009, when each time you had to refresh the page for new updates ?? Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  4. Why ReactJS Real Time Data Initial Data User Input Dispatcher Store Refresh View Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  5. Why ReactJS Drawbacks Of Traditional Data Flow ▪ Uses DOM (Document Object Model) ▪ More memory consumption ▪ Slow performance DOM Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  6. Why ReactJS Drawbacks Of Traditional Data Flow ▪ Uses DOM (Document Object Model) DOM ▪ More memory consumption ▪ Slow performance DOM DOM Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  7. React JS 1 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  8. React JS 2 101 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  9. React JS 1 2 4 3 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  10. React JS 2 3 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  11. React JS 101 2 4 3 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  12. Why ReactJS? Facebook after implementation of ReactJS became more user friendly. Each time new stories are added, a New Stories notification appears. Clicking which will automatically refresh the news feeds section. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  13. Why ReactJS? Real Time Data Initial Data User Input Dispatcher Store View Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  14. Why ReactJS? Real Time Data Initial Data User Input Dispatcher Store Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  15. Why ReactJS? Real Time Data Initial Data User Input Dispatcher Store View Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  16. Agenda What Is ReactJS? Advantages Of ReactJS ReactJS Installation Hello World Program ReactJS Fundamentals Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  17. What Is ReactJS? Now, let’s understand what is ReactJS. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  18. What Is ReactJS? ReactJS is an open source JavaScript library used to develop User Interfaces. ReactJS was introduced by Facebook on May, 2013. It was open sourced in March, 2015. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  19. What Is ReactJS? ReactJS is concerned with the components that utilizes the expressiveness of JavaScript with a HTML – like template syntax. It is basically the View in MVC (Model-View-Controller) Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  20. Aspects Of ReactJS? Virtual DOM Real DOM Patch Virtual DOM Data Binding Serverside Rendering Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  21. Aspects Of ReactJS? Action Virtual DOM View Action Dispatcher Store Data Binding One Way Data Binding Serverside Rendering Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  22. Aspects Of ReactJS? Virtual DOM Data Binding Serverside Rendering Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  23. Advantages of ReactJS Let’s find out the advantages of ReactJS. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  24. Advantages of ReactJS Application’s performance is increased Used on Client as well as Server Side Readability is improved Easily used with other frameworks Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  25. ReactJS Installation Let’s get started with ReactJS. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  26. ReactJS Installation Add these <script> tags inside <head> tag of your HTML code. <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  27. Hello World Program Let’s start coding with ReactJS. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  28. Hello World Program Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  29. Hello World Program Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  30. Hello World Program This is how the output will look like: Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  31. ReactJS Fundamentals Let’s find out about various concepts we just used in our code Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  32. JSX Lifecycle Refs Router Props 1 8 9 2 3 4 5 6 7 States Keys Components Events Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  33. JSX Lifecycle Refs Router Props 8 9 2 3 4 5 6 7 States Keys Components Events Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  34. JSX function intro(){ return <h1>Hello World!!</h1>; } ✓ JSX stands for JavaScript XML JSX ✓ Makes HTML easy to understand ✓ It is Robust ✓ Boosts up the JS performance Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  35. JSX Uses Regular JSX var MyComponent = React.createClass({ render : function () { return ( <div> Hello World!!! </div> ); }); JSX Nested Elements Specifying Attributes Embedding JavaScript Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  36. JSX Uses Regular JSX var MyComponent = React.createClass( { render : function () { return ( <div> <h1>Header</h1> <h2>Content</h2> <p>This is the content!!!</p> </div> ); } }); JSX Nested Elements Specifying Attributes Embedding JavaScript <h1>,<h2>,<p> nested inside <div> Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  37. JSX Uses Regular JSX var styles={ backgroundcolor: ’cyan’}; var MyComponent=React.createClass({ render : function () { return ( <div style={styles}> <h1>Header</h1> </div> ); } }); JSX Nested Elements Specifying Attributes Embedding JavaScript Adding Attributes Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  38. JSX Uses Regular JSX JavaScript Expression JSX Nested Elements var MyComponent = React.createClass({ render: function () { return( <div> <h2> {2+4} </h2> </div> ); } }); Specifying Attributes Embedding JavaScript Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  39. JSX Lifecycle Refs Router Props 1 8 9 2 3 4 5 6 7 States Keys Events Components Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  40. Components Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  41. Components Component 1 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  42. Components Component 2 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  43. Components Component 3 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  44. Components Everything in ReactJS is component 1 Each Component Return a DOM Object 2 It splits the UI into independent reusable pieces 3 Each independent piece is processed separately 4 It can refer other components in output 5 It can be further split into smaller components 6 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  45. Components ✓ A valid React component, accepts a single ‘props’ object argument to produce a React element. ✓ These are called “functional” as they literally are JavaScript functions. <button onClick={this.handleClick}>Click Here</button> Prop Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  46. Components Simplest component is through JavaScript way of defining a STATEFUL Components in ReactJS can be in two forms: 1. Stateful: Remembers everything it does 2. Stateless: Doesn’t remembers anything it does. STATELESS <Component/> STATELESS <Component/> Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  47. Stateful Components Core which stores information about components state in memory 1 Can change states 2 Contains knowledge of past, current and possible future state changes 3 Receives information from the stateless components if state change is required 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  48. Stateless Components Calculates states internal state of components 1 Never changes the state 2 Contains no knowledge of past, current and possible future state changes 3 Provides Referential Transparency i.e for same inputs will produce same output 4 Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  49. Props Lifecycle JSX Refs Router 1 8 9 2 3 4 5 6 7 States Keys Components Events Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  50. Props ✓ Props are read-only components ✓ Whether components are declared as function or class, it must never change its props ✓ Such components are called ‘pure functions’ RULE: All React components must act like pure functions with respect to their props. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

More Related