Video Link
Video Link
KG Coding
Some Other One shot Video Links:
• Complete HTML
• Complete CSS
• Complete JavaScript
• Complete React and Redux
• One shot University Exam Series
1. What is React?
2. Working of DOM
3. Problems with JS
4. Working of React
5. JS Vs React
6. Intro to Components
HTML is required for React
CSS is required for React
JS is required for React
1. What is React
1. JavaScript library to build Dynamic
and interactive user interfaces
2. Developed at Facebook in 2011.
3. Currently most widely used JS
library for front-end development.
4. Used to create single page
application (page does not re-load).
2. Working of DOM
1. What is React?
2. Working of DOM
3. Problems with JS
4. Working of React
5. JS Vs React
6. Intro to Components
KG Coding
Some Other One shot Video Links:
• Complete HTML
• Complete CSS
• Complete JavaScript
• Complete React and Redux
• One shot University Exam Series
7. Setup IDE
8. Create a React App
9. Project Structure
FF5F1F
7. What is IDE
1. IDE stands for Integrated
Development Environment.
2. Software suite that
consolidates basic tools
required for software
development.
3. Central hub for coding, finding
problems, and testing.
4. Designed to improve
developer efficiency.
FF5F1F
7. Need of IDE
1. Streamlines development.
2. Increases productivity.
3. Simplifies complex tasks.
4. Offers a unified workspace.
5. IDE Features
1. Code Autocomplete
2. Syntax Highlighting
3. Version Control
4. Error Checking
7. Install latest Node
1. Search VS Code
2. Keep Your Software up to date
7. VsCode Extensions and Settings
1. Live Server / Live Preview
2. Prettier (Format on Save)
3. Line Wrap
4. Tab Size from 4 to 2
8. Create a React App
7. Setup IDE
8. Create a React App
9. Project Structure
KG Coding
Some Other One shot Video Links:
• Complete HTML
• Complete CSS
• Complete JavaScript
• Complete React and Redux
• One shot University Exam Series
.JSX
• Stands for JavaScript XML
• Combines JavaScript with HTML-like
tags
• Makes it easier to design UI
components
11. Class vs Function Components
Class Components
• Stateful: Can manage state.
• Lifecycle: Access to lifecycle methods.
• Verbose: More boilerplate code.
• Not Preferred anymore.
Functional Components
• Initially stateless.
• Can use Hooks for state and effects.
• Simpler and more concise.
• More Popular.
12. What is JSX?
10. FileExtensions
11. Class vs Function Components
12. What is JSX?
13. Exporting component
14. Other important Points
15. Dynamic Components
16. Reusable Components
17. Including Bootstrap
1. Responsive: Mobile-first design for all device
sizes.
2. Components: Pre-styled elements like buttons
and navbars.
3. Customizable: Modify default styles as needed.
4. Cross-Browser: Consistent look across browsers.
5. Open-Source: Free with community support.
1. Install:
npm i [email protected]
2. import
import "bootstrap/dist/css/bootstrap.min.css";
Project: TODO App UI
Project: Clock
KG Coding
Some Other One shot Video Links:
• Complete HTML
• Complete CSS
• Complete JavaScript
• Complete React and Redux
• One shot University Exam Series
1. What?
Allows grouping of multiple elements without
extra DOM nodes.
2. Why?
• Return multiple elements without a wrapping
parent.
• Cleaner DOM and consistent styling.
3. How? Two syntaxes:
1. <React.Fragment>...</React.Fragment>
2. Short: <>...</>
19. Map Method
Conditional Rendering
• Displaying content based on certain conditions.
• Allows for dynamic user interfaces.
Methods
• If-else statements: Choose between two blocks
of content.
• Ternary operators: Quick way to choose
between two options.
• Logical operators: Useful for rendering content
when a condition is true.
Benefits
• Enhances user experience.
• Reduces unnecessary rendering.
• Makes apps more interactive and responsive.
21. Passing Data via Props
Props in React
• Short for properties
• Mechanism for passing data.
• Read-only by default
Usage
• Pass data from parent to child component.
• Makes components reusable.
• Defined as attributes in JSX.
Key Points
• Data flows one-way (downwards).
• Props are immutable.
• Used for communication between components.
Examples
<Header title="My App" />
22. CSS Modules
State:
• Local and mutable data within a component.
• Initialized within the component.
• Can change over time.
• Causes re-render when updated.
• Managed using useState in functional components.
Props:
• Passed into a component from its parent.
• Read-only (immutable) within the receiving component.
• Allow parent-to-child component communication.
• Changes in props can also cause a re-render.
Project Calculator
Project: TODO App
KG Coding
Some Other One shot Video Links:
• Complete HTML
• Complete CSS
• Complete JavaScript
• Complete React and Redux
• One shot University Exam Series
Root Component:
• The App is the main or root component of a React application.
• It's the starting point of your React component tree.
Virtual DOM:
• React creates an in-memory structure called the virtual DOM.
• Different from the actual browser DOM.
• It's a lightweight representation where each node stands for a
component and its attributes.
Reconciliation Process:
• When component data changes, React updates the virtual DOM's
state to mirror these changes.
• React then compares the current and previous versions of the
virtual DOM.
• It identifies the specific nodes that need updating.
• Only these nodes are updated in the real browser DOM, making it
efficient.
Real Browser
30. How React Works
•React and ReactDOM:
• The actual updating of the browser's DOM isn't done by React itself.
• It's handled by a companion library called react-dom.
•Root Element:
• The root div acts as a container for the React app.
• The script tag is where the React app starts executing.
• If you check main.tsx, the component tree is rendered inside this
root element.
•Strict Mode Component:
• It's a special component in React.
• Doesn't have a visual representation.
• Its purpose is to spot potential issues in your React app.
•Platform Independence:
• React's design allows it to be platform-agnostic.
• While react-dom helps build web UIs using React, ReactNative can
be used to craft mobile app UIs.
31. React Vs Angular vs Vue
•React, Angular, and Vue:
• React is a library, while Angular and Vue.js are frameworks.
• React focuses on UI; Angular and Vue.js offer comprehensive
tools for full app development.
•Library vs. Framework:
• A library offers specific functionality.
• A framework provides a set of tools and guidelines.
• In simpler terms: React is a tool; Angular and Vue.js are toolsets.
•React's Specialty:
• React's main role is crafting dynamic, interactive UIs.
• It doesn't handle routing, HTTP calls, state management, and
more.
•React's Flexibility:
• React doesn't dictate tool choices for other app aspects.
• Developers pick what fits their project best.
•About Angular and Vue.js:
• Angular, developed by Google, provides a robust framework with
a steep learning curve.
• Vue.js is known for its simplicity and ease of integration, making
it beginner-friendly.
32. Using Forms
1. State Management: Each input's state
is stored in the component's state.
2. Handling Changes: Use onChange to
detect input changes.
3. Submission: Utilize onSubmit for form
submissions and prevent default with
event.preventDefault().
4. Validation: Implement custom
validation or use third-party libraries.
33. Use Ref
1. useRef allows access to DOM elements and
retains mutable values without re-renders.
2. Used with the ref attribute for direct DOM
interactions.
3. Can hold previous state or prop values.
4. Not limited to DOM references; can hold any
value.
5. Refs can be passed as props also
34. Update state from Previous State
1. npm init –y
2. npm install redux
3. import in node Const redux = require(‘redux’);
4. We need to setup all 4 basic things:
1. Reducer
2. Store
3. Subscriber
4. Actions
5. Node redux-demo.js command to run node server
56 React with Redux
1. Npm install redux
2. Npm install react-redux
3. Create store folder with Index.js file
4. Creating the store using
Import {createStore} from redux.
5. Providing the store with react
1. Provider from react-redux
2. <Provider store={store}><App /></Provider>
6. Using the store
1. useSelector hook gets a slice of the store.
Const counter = useSelector(state => state.counter);
2. Subscription is already setup and only will re-execute
when only your slice is changed. Subscription is
automatically cleared also.
7. Dispatch Actions using the useDispatch hook.
57 Why Redux Toolkit