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

[Feature]: remove Suspensive -> rename as DefaultProps #1076

Closed
manudeli opened this issue Jul 13, 2024 · 1 comment
Closed

[Feature]: remove Suspensive -> rename as DefaultProps #1076

manudeli opened this issue Jul 13, 2024 · 1 comment
Assignees
Milestone

Comments

@manudeli
Copy link
Member

manudeli commented Jul 13, 2024

Package Scope

@suspensive/react

Description

AS IS

import { Suspensive, SuspensiveProvider } from '@suspensive/react'
 
const suspensive = new Suspensive({
  defaultProps: {
    delay: {
      ms: 1200,
    },
    suspense: {
      fallback: <Spinner />,
      clientOnly: false,
    },
  },
})
 
function App() {
  return <SuspensiveProvider value={suspensive}>...</SuspensiveProvider>
}

TO BE

import { DefaultProps, DefaultPropsProvider, Cache, CacheProvider} from '@suspensive/react'
 
const defaultProps = new DefaultProps({
  Delay: {
    ms: 1200,
  },
  Suspense: {
    fallback: <Spinner />,
    clientOnly: false,
  },
})

const cache = new Cache({
  staleTime: 2000
})
 
function App() {
  return (
    <CacheProvider cache={cache}>
      <DefaultPropsProvider defaultProps={defaultProps}>
        ...
      </DefaultPropsProvider>
    </CacheProvider>
  )
}

Possible Solution

No response

etc.

No response

manudeli added a commit that referenced this issue Jul 13, 2024
…s, PromiseCache, PromiseCacheProvider, usePromiseCache (#1074)

related with #1076
close #1069

# Overview

- add SuspensePromise, useSuspensePromise, promiseOptions, PromiseCache,
PromiseCacheProvider, usePromiseCache
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
@manudeli manudeli added this to the v3 milestone Jul 18, 2024
@manudeli
Copy link
Member Author

I'll support DefaultPropsProvider, SuspensiveProvider samely, and mark SuspensiveProvider as deprecated jsdoc. then I'll remove it at Suspensive v3

@manudeli manudeli self-assigned this Jul 28, 2024
manudeli added a commit that referenced this issue Jul 30, 2024
related with
#1076 (comment)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Suspensive is used only to provide defaultProps.
I want to make it more intuitively.

So I deprecate Suspensive, SuspensiveProvider and add DefaultProps
DefaultPropsProvider
I want to remove Suspensive, SuspensiveProvider in v3

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: GwanSik Kim <Seorit98@gmail.com>
@manudeli manudeli changed the title [Feature]: remove Suspensive -> rename as DefaultProps, add Cache in v3 [Feature]: remove Suspensive -> rename as DefaultProps Aug 1, 2024
@manudeli manudeli closed this as completed Aug 1, 2024
manudeli added a commit that referenced this issue Aug 3, 2024
…s, PromiseCache, PromiseCacheProvider, usePromiseCache (#1074)

related with #1076
close #1069

# Overview

- add SuspensePromise, useSuspensePromise, promiseOptions, PromiseCache,
PromiseCacheProvider, usePromiseCache
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
manudeli added a commit that referenced this issue Aug 3, 2024
related with
#1076 (comment)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Suspensive is used only to provide defaultProps.
I want to make it more intuitively.

So I deprecate Suspensive, SuspensiveProvider and add DefaultProps
DefaultPropsProvider
I want to remove Suspensive, SuspensiveProvider in v3

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: GwanSik Kim <Seorit98@gmail.com>
manudeli pushed a commit that referenced this issue Aug 3, 2024
…s, PromiseCache, PromiseCacheProvider, usePromiseCache (#1074)

related with #1076
close #1069

# Overview

- add SuspensePromise, useSuspensePromise, promiseOptions, PromiseCache,
PromiseCacheProvider, usePromiseCache
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------
manudeli added a commit that referenced this issue Aug 3, 2024
related with
#1076 (comment)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Suspensive is used only to provide defaultProps.
I want to make it more intuitively.

So I deprecate Suspensive, SuspensiveProvider and add DefaultProps
DefaultPropsProvider
I want to remove Suspensive, SuspensiveProvider in v3

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------
manudeli added a commit that referenced this issue Aug 3, 2024
…s, PromiseCache, PromiseCacheProvider, usePromiseCache (#1074)

related with #1076
close #1069

# Overview

- add SuspensePromise, useSuspensePromise, promiseOptions, PromiseCache,
PromiseCacheProvider, usePromiseCache
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
manudeli added a commit that referenced this issue Aug 3, 2024
related with
#1076 (comment)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Suspensive is used only to provide defaultProps.
I want to make it more intuitively.

So I deprecate Suspensive, SuspensiveProvider and add DefaultProps
DefaultPropsProvider
I want to remove Suspensive, SuspensiveProvider in v3

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: GwanSik Kim <Seorit98@gmail.com>
manudeli added a commit that referenced this issue Aug 3, 2024
…s, PromiseCache, PromiseCacheProvider, usePromiseCache (#1074)

related with #1076
close #1069

# Overview

- add SuspensePromise, useSuspensePromise, promiseOptions, PromiseCache,
PromiseCacheProvider, usePromiseCache
<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
manudeli added a commit that referenced this issue Aug 3, 2024
related with
#1076 (comment)

# Overview

<!--
    A clear and concise description of what this pr is about.
 -->

Suspensive is used only to provide defaultProps.
I want to make it more intuitively.

So I deprecate Suspensive, SuspensiveProvider and add DefaultProps
DefaultPropsProvider
I want to remove Suspensive, SuspensiveProvider in v3

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: GwanSik Kim <Seorit98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant