Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import React from 'react';
  2. import request from 'superagent'
  3.  
  4. const UserItems = () => {
  5. request.get('http://localhost:4000/user/1/items.json')
  6. .then((res, err) => {
  7. if (err) {
  8. console.log("errror found")
  9. }
  10. var data = JSON.parse(res.text)
  11. console.log("inside ajax")
  12. console.log(data)
  13. })
  14. console.log("outside ajax")
  15. console.log(data)
  16. };
  17.  
  18. export default UserItems;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement