GitHub 6219★

Reload the current page

JavaScript version

const reload = () => location.reload();

// Or
const reload = () => (location.href = location.href);

TypeScript version

const reload = (): void => location.reload();

// Or
const reload = (): string => (location.href = location.href);
Follow me on and to get more useful contents.