-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7310d8
commit 5d20744
Showing
15 changed files
with
821 additions
and
32 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
|
||
const Blog = () => { | ||
|
||
return ( | ||
<div className='sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-4 lg:px-8 lg:py-4 justify-center'> | ||
<div className='p-12 bg-slate-600 rounded'> | ||
<h1 className='text-3xl py-4'>Question: What Is The Purpose Of React Router?</h1> | ||
<p>ANS:React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, and keeps the UI in sync with the URL</p> | ||
</div> | ||
<div className='p-12 bg-slate-600 rounded'> | ||
<h1 className='text-3xl py-4'>Question: How Does ContextApi Works? </h1> | ||
<p>ANS:The React Context API is a way for a React app to effectively produce global variables that can be passed around. This is the alternative to "prop drilling" or moving props from grandparent to child to parent, and so on. Context is also touted as an easier, lighter approach to state management using Redux</p> | ||
</div> | ||
<div className='p-12 bg-slate-600 rounded'> | ||
<h1 className='text-3xl py-4'>What Is useRef Hooks?</h1> | ||
<p>ANS:The useRef Hook allows you to persist values between renders. It can be used to store a mutable value that does not cause a re-render when updated. It can be used to access a DOM element directly</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Blog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { useLoaderData } from 'react-router-dom'; | ||
|
||
import Topicdetails from '../Topicdetails/Topicdetails'; | ||
|
||
const Item = () => { | ||
const allData = useLoaderData().data; | ||
console.log(allData); | ||
|
||
|
||
|
||
|
||
return ( | ||
<div className='grid grid-cols-1 md:grid-cols-3 gap-5 ' > | ||
{ | ||
allData.map(topic => <Topicdetails key={topic.id} topic={topic}></Topicdetails>) | ||
} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Item; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.dev{ | ||
display: flex; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.rechart div{ | ||
margin: 50px auto; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
const Topicdetails = ({topic}) => { | ||
const{name,total,logo} = topic; | ||
return ( | ||
<div className='p-5 m-5 '> | ||
<div className="card w-50 bg-yellow-500 shadow-xl"> | ||
<figure><img src={logo} alt="Shoes" /></figure> | ||
<div className="card-body"> | ||
<h2 className="card-title">{name}</h2> | ||
<p>{total}</p> | ||
<div className="card-actions justify-end"> | ||
<button className="btn btn-primary">Buy Now</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Topicdetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters