Comments (1)
So after a little bit of experimentation, I determined that we have to initialize the page variable to 1, not to 0. This is because the unsplash api returns the first ten photo results during the initial load with page as 0 by default, even though there technically is no page 0 because the first ten results are returned whether page is set to 0 or 1. So, if we start with page as 0, we get the first ten results, and when the user scrolls for the first time, page increases by 1, and the first ten results are returned again, then the next ten results, and so on.
from react-projects.
Related Issues (20)
- React-projects HOT 1
- Unable to parse color from string remove it HOT 1
- React js HOT 3
- react-js
- Project Cocktail.
- npm start not working on react-scripts version 3.4.3 HOT 1
- on 15 project HOT 1
- Project 8 Lorem Ipsum Setup HOT 1
- Need clarification - 02: Tours HOT 1
- Issue with babel-loader module
- Websites images HOT 1
- Project 9 - Color Generator setError(false)
- 09-color-generator is missing values.js HOT 3
- React project
- REACT PROJECTS
- React HOT 1
- Cocktails project Bad Api HOT 1
- About github User HOT 1
- Tes HOT 2
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 react-projects.