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]: AI Autogenerated fallback prop of Suspense #752

Open
manudeli opened this issue Feb 21, 2024 · 0 comments
Open

[Feature]: AI Autogenerated fallback prop of Suspense #752

manudeli opened this issue Feb 21, 2024 · 0 comments
Assignees

Comments

@manudeli
Copy link
Member

manudeli commented Feb 21, 2024

Package Scope

@suspensive/react

Description

AI Autogenerated fallback

Possible Solution

import { AIGeneratedFallback } from '@suspensive/react'

const Example = () => {
  const [suspensive] = useState(() => new Suspensive({
    defaultProps: {
      suspense: {
        fallback: <AIGeneratedFallback/>
      }
    }
  }))

  return (
    <SuspensiveProvider value={suspensive}>
      <Suspense> // AIGeneratedFallback default fallback 
        children
      </Suspense>
      <Suspense fallback={<CustomFallback>}> // overrided fallback
        children
      </Suspense>
    </SuspensiveProvider>
  )
}

etc.

No response

@manudeli manudeli self-assigned this Feb 21, 2024
@manudeli manudeli changed the title [Feature]: AI Autogenerated fallback [Feature]: AI Autogenerated fallback prop of Suspense Feb 21, 2024
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