JSFiddle - React, Tailwind, and code Playground

by Vladymyr Shevchuk

Babel + JSX

/* fetch('https://jsonplaceholder.typicode.com/posts/2')
  .then(response => {
    return response.json();
  })
  .then(data => {
    console.error(data);
  }); */
  
async function foo () {
	const response = await fetch('https://jsonplaceholder.typicode.com/posts/2');
  const data = await response.json();
  
  console.log('data', data);
}

foo();