Skip to content

Commit

Permalink
understand component in react
Browse files Browse the repository at this point in the history
  • Loading branch information
PriyankaBtech committed Aug 19, 2023
1 parent 8744f42 commit d6c6a94
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
26 changes: 3 additions & 23 deletions 01_basicreact/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,14 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->

<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->

</body>
</html>
6 changes: 5 additions & 1 deletion 01_basicreact/src/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@

import Code from './Code'

function App() {
return (
<h1>Happy To Learn React</h1>
<>
<Code/>
</>
);
}

Expand Down
11 changes: 11 additions & 0 deletions 01_basicreact/src/Code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

function Code() {
return (
<h1>
React Basics
</h1>

)
}

export default Code
5 changes: 3 additions & 2 deletions 01_basicreact/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom/client';

import App from './App';


const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>

<App />
</React.StrictMode>

);


11 changes: 8 additions & 3 deletions 01_vitereact/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@

import Code from "./code"

function App() {

return (
<h1>Happy To Learn React with Vite || Priyanka </h1>
return (

<div>
<Code/>
<h1>Understand React</h1>
<p>with fundamentals</p>
</div>

)
}
Expand Down
8 changes: 8 additions & 0 deletions 01_vitereact/src/code.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

function Code() {
return (
<h2>Code With React</h2>
)
}

export default Code

0 comments on commit d6c6a94

Please sign in to comment.