Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- componentDidMount: function(){
- var url = 'I have an api here'
- axios.get(url).then(function(response){
- var arr = $.map(response.data, function(el) {
- $.each(el, function (i, word) {
- this.setState({el: el});
- $("#data").append(
- '<tr><td>' + el.name + '</td><td>' + el.email + '</td><td>' + el.category + '</td><td>' + el.address + '</td><td>' + '<button onClick={console.log(el)} class="btn btn-primary">delete</button>'
- );
- });
- });
- $('body').addClass('stop-scrolling');
- })
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement