Comments (15)
yeah I'm currently working on it
from github-error-solve.
@devvsakib I am interested in this and i am learning about it so i am also doing it, i wanted to ask you about this
i reached to this but i dont know how to fetch the data from the new URLs
I dont know if you did this and i dont know how you are going to do it , if you did it then i will check how you did it after you finish, if you didnt then lets help each other because api things are kinda new to me
from github-error-solve.
yeah GitHub API has limitation for request
from github-error-solve.
the line breaks your code from mine(visually)
import { useState, useEffect } from 'react'
function App() {
// ==================================================================
const url = 'https://api.github.com/repos/devvsakib/github-error-solve/contributors'
const [data, setData] = useState([])
useEffect( () => {
const fetchUsers = async (url) => {
const response = await fetch(url)
const users = await response.json()
setData(users)
}
fetchUsers(url)
}, [data.length])
// ===================================================================
const [userData, setuserData] = useState([])
var userUrl
data.map( data => {
userUrl = `https://api.github.com/users/${data.login}`
console.log(userUrl)
}
)
useEffect( () => {
const fetchTwitter = async (userUrl) => {
const Userresponse = await fetch(userUrl)
const twitter = await Userresponse.json()
setuserData(twitter)
}
fetchTwitter(userUrl)
}, [userData.length])
// ===================================================================
return (
<div>
{
userData.map(userData =>
<h1>{userData.twitter_username}</h1>
)
}
</div>
)
}
export default App
from github-error-solve.
actually i got another idea
from github-error-solve.
nvm all that code
from github-error-solve.
God i just got the same product with less code LMAO
Image
Code
import { useState, useEffect } from 'react'
function App() {
// ==================================================================
const url = 'https://api.github.com/repos/devvsakib/github-error-solve/contributors'
const [data, setData] = useState([])
useEffect( () => {
const fetchUsers = async (url) => {
const response = await fetch(url)
const users = await response.json()
setData(users)
}
fetchUsers(url)
}, [data.length])
// ===================================================================
// ===================================================================
return (
<div>
{
data.map(data =>
<h1>{data.url}</h1>
)
}
</div>
)
}
export default App
from github-error-solve.
My problem is in fetching that url
from github-error-solve.
@devvsakib I JUST FOUND THE SOLUTION
from github-error-solve.
from github-error-solve.
for a reason i dont know it keeps repeating
from github-error-solve.
bruh its not working now
from github-error-solve.
Im in nutshell with these API'sπ I wrote some code but didn't test it. I have to do an assignment tooπ
I will suggest you try all this API fetch in vanilla javascript. first, fetch contributors then again users.π
from github-error-solve.
Yes, that is good idea but for now i cant because it says "rate limiting" when opening the contributors API π
from github-error-solve.
Closed as complete #115
from github-error-solve.
Related Issues (20)
- README contributors section change HOT 1
- Add a vercel json file to redirect HOT 2
- add animation to filter menu HOT 2
- [FEAT]: add a 404 page HOT 1
- add GIT cmd to json file HOT 7
- add a footer HOT 1
- Use modals to show solutions HOT 6
- Add copy button/icon next to the solution commands HOT 3
- add link to footer HOT 2
- Docs: Customise documentation HOT 2
- CI: Add github actions
- chore: Add a PR templates HOT 3
- feat: add husky + prettier HOT 4
- [FEAT]: add animation to card when scroll down or vissible HOT 12
- [BUG]: FilterType menu ease-in-out animation HOT 13
- chore: use yarn instead of npm HOT 1
- feat: migrate to pnpm HOT 1
- add new error with solution HOT 3
- Mispositioning of Error message HOT 3
- new error found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-error-solve.