Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next release #7

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions .changeset/fresh-monkeys-yell.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/short-moles-taste.md

This file was deleted.

24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# spin-delay

## 2.0.0

### Major Changes

- [#8](https://github.com/smeijer/spin-delay/pull/8) [`1b81585`](https://github.com/smeijer/spin-delay/commit/1b815854e454e2d10357f2dd586370ef9de44b4d) Thanks [@smeijer](https://github.com/smeijer)! - We now support spinner initialization from the server (SSR). When the `loading` prop is `true` due to server-side rendering, the spinner will be shown immediately. You can opt-out of this behavior by setting the `ssr` option to `false`.

```tsx
import { useSpinDelay } from 'spin-delay';

const spin = useSpinDelay(loading, {
ssr: false, // defaults to true
});
```

- [#6](https://github.com/smeijer/spin-delay/pull/6) [`3d4f4d5`](https://github.com/smeijer/spin-delay/commit/3d4f4d51db5c3e0b9a301ff5ada5e9efbe5fd35a) Thanks [@smeijer](https://github.com/smeijer)! - We've to removed the default export. Please update your code to use the named
export instead. This is a breaking change, but it's a minor one. Chances are
that you're already using the named export, and you don't have to do anything.

```diff
- import useSpinDelay from 'spin-delay';
+ import { useSpinDelay } from 'spin-delay';
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spin-delay",
"version": "1.2.0",
"version": "2.0.0",
"description": "Smart spinner helper for React, to manage the duration of loading states.",
"source": "src/index.ts",
"main": "dist/index.js",
Expand Down