SHARE
TWEET

Untitled

a guest Jun 26th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class App extends Component {
  2.  
  3.     doStuff() {
  4.         console.log("Doing stuff");
  5.         this.setState({ type: "loading" });
  6.  
  7.         fetch(`/api/dostuff`)
  8.             .then(response => response.json())
  9.             .then((data) => {
  10.                 debugger;
  11.                 this.setState({     <-- Why is it undefined here????
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top