Skip to content

Commit 741a752

Browse files
committed
resolved some issues
1 parent 74d35d6 commit 741a752

File tree

28 files changed

+17
-52
lines changed

28 files changed

+17
-52
lines changed

courses/react-js/advanced-level/advanced-react-concepts/Component.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
import withLogger from "./withLogger";
42

53
const Component = ({ message }) => {

courses/react-js/advanced-level/advanced-react-concepts/withLogger.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
const withLogger = (WrappedComponent) => {
42
return (props) => {
53
console.log(`Rendering ${WrappedComponent.name} with props:`, props);

courses/react-js/advanced-level/component-optimization/LazyLoadingExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Suspense } from "react";
1+
import { Suspense } from "react";
22
const LazyComponent = React.lazy(() => import("./LazyComponent"));
33
const LazyLoadingExample = () => {
44
return (

courses/react-js/advanced-level/component-optimization/MemoizationExample.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import React, { useMemo, useState } from "react";
1+
import { useMemo, useState } from "react";
22

33
const ExpensiveComponent = ({ value }) => {
44
const expensiveFunction = (value) => {
5-
// Expensive computation
65
return value * 2;
76
};
87
const memoizedValue = useMemo(() => expensiveFunction(value), [value]);

courses/react-js/advanced-level/component-optimization/VirtualizationExample.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { FixedSizeList } from "react-window";
32
const VirtualizationExample = () => {
43
const Row = ({ index, style }) => <div style={style}>Row {index}</div>;

courses/react-js/begginer-level/building-user-interfaces/IfElseExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function IfElseExample() {
44
const [isLoggedIn, setIsLoggedIn] = useState(false);

courses/react-js/begginer-level/building-user-interfaces/KeyPropExample.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function KeyPropExample() {
42
const items = [
53
{ id: 1, name: "Apple" },

courses/react-js/begginer-level/building-user-interfaces/ListExample.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function ListExample() {
42
const items = ["Apple", "Banana", "Cherry", "Date"];
53

courses/react-js/begginer-level/building-user-interfaces/TernaryOperatorExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function TernaryOperatorExample() {
44
const [isError, setIsError] = useState(false);

courses/react-js/begginer-level/building-your-first-react-app/Counter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from "react";
1+
import { Component } from "react";
22

33
class Counter extends Component {
44
constructor(props) {

courses/react-js/begginer-level/building-your-first-react-app/MyComponent.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
1-
import React from 'react';
2-
3-
// Define a functional component using JSX
41
const MyComponent = () => {
5-
// Define some variables to use in JSX expressions
62
const name = "Ajay";
73
const isLoggedIn = true;
84
const fruits = ["apple", "banana", "orange"];
95

10-
// JSX component rendering
116
return (
127
<div>
138
<h1>Hello, {name}!</h1>
149

15-
{/* Embedding expressions */}
1610
<p>{isLoggedIn ? "You are logged in" : "Please log in"}</p>
1711

18-
{/* Defining attributes */}
1912
<img src="https://github.com/ajay-dhangar.png" alt="Ajay" style={{ width: "100px", borderRadius: "50%" }} />
2013

21-
{/* Conditionally render elements */}
2214
{isLoggedIn && <p>Welcome back, {name}!</p>}
2315

24-
{/* Mapping over arrays */}
2516
<ul>
26-
{fruits.map((fruit, index) => (
27-
<li key={index}>{fruit}</li>
17+
{fruits.map((fruit) => (
18+
<li>{fruit}</li>
2819
))}
2920
</ul>
3021

31-
{/* Compose components */}
3222
<Button text="Click me" onClick={() => alert("Button clicked!")} />
3323
</div>
3424
);
3525
}
3626

37-
// Another component to compose
3827
const Button = ({ text, onClick }) => {
3928
return <button onClick={onClick}>{text}</button>;
4029
}

courses/react-js/begginer-level/building-your-first-react-app/WelcomeMessage.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
function WelcomeMessage() {
42
return <div>Welcome to React!</div>;
53
}

courses/react-js/begginer-level/introduction-to-forms/FormComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function FormComponent() {
44
const [formData, setFormData] = useState({

courses/react-js/begginer-level/working-with-components-and-data/ChangeEventExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22

33
function ChangeEventExample() {
44
const [value, setValue] = useState('');

courses/react-js/begginer-level/working-with-components-and-data/ComplexStateExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22

33
function ComplexStateExample() {
44
const [user, setUser] = useState({ name: "Ajay", age: 24 });

courses/react-js/begginer-level/working-with-components-and-data/SubmitEventExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22

33
function SubmitEventExample() {
44
const [value, setValue] = useState('');

courses/react-js/intermidiate-level/handling-data-flow/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { ThemeProvider } from "./ThemeContext";
32
import Header from "./Header";
43
import Content from "./Content";

courses/react-js/intermidiate-level/handling-data-flow/Content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext } from "react";
1+
import { useContext } from "react";
22
import { ThemeContext } from "./ThemeContext";
33

44
function Content() {

courses/react-js/intermidiate-level/handling-data-flow/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useContext } from "react";
1+
import { useContext } from "react";
22
import { ThemeContext } from "./ThemeContext";
33

44
function Header() {

courses/react-js/intermidiate-level/handling-data-flow/ReduxApp/Counter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { connect } from "react-redux";
32

43
function Counter({ count, increment, decrement }) {

courses/react-js/intermidiate-level/handling-data-flow/ReduxApp/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { Provider } from "react-redux";
32
import store from "./store";
43
import Counter from "./Counter";

courses/react-js/intermidiate-level/handling-data-flow/ThemeContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { createContext, useState } from "react";
1+
import { createContext, useState } from "react";
22

33
const ThemeContext = createContext();
44

courses/react-js/intermidiate-level/managing-complex-uis/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22
import ParentComponent from "./ParentComponent";
33

44
function App() {

courses/react-js/intermidiate-level/managing-complex-uis/ParentComponent.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import ChildComponent from "./ChildComponent";
32

43
function ParentComponent({ count, incrementCount }) {

courses/react-js/intermidiate-level/managing-complex-uis/TodoApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import { useState } from "react";
22
import TodoList from "./TodoList";
33

44
function TodoApp() {

courses/react-js/intermidiate-level/managing-complex-uis/TodoList.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import TodoItem from "./TodoItem";
32

43
function TodoList({ todos, toggleTodo }) {

courses/react-js/intermidiate-level/working-with-apis/UserList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from "react";
1+
import { useState, useEffect } from "react";
22

33
function UserList() {
44
const [users, setUsers] = useState([]);

src/components/TeamProfileCards/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
3-
*
4-
* This source code is licensed under the MIT license found in the
5-
* LICENSE file in the root directory of this source tree.
6-
*/
7-
81
import React, { type ReactNode } from "react";
92
import Translate from "@docusaurus/Translate";
103
import Link from "@docusaurus/Link";

0 commit comments

Comments
 (0)