Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

limit data with axios in react js

componentDidMount() {
  axios.get('https://jsonplaceholder.typicode.com/todos',{
    params: {
      _limit: 10
     }
  })
    .then((res) => {
      this.setState({
        todos: res.data
      });
    })
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #limit #data #axios #react #js
ADD COMMENT
Topic
Name
9+1 =