```jsx
const [loading, setLoading] = React.useState(false);

const handleClick = () => {
  setLoading(true);

  setTimeout(() => {
    setLoading(false);
  }, 3000);
};

<SaveButton loading={loading} onClick={handleClick}>
  Save
</SaveButton>
```