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

fix: don't return from startTransition #91

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

mcansh
Copy link
Contributor

@mcansh mcansh commented Nov 28, 2022

types appear to have changed and now startTransition wants a return of void or undefined

app/entry.client.tsx:7:5 - error TS2322: Type 'Root' is not assignable to type 'VoidOrUndefinedOnly'.

  7     hydrateRoot(
        ~~~~~~~~~~~~
  8       document,
    ~~~~~~~~~~~~~~~
... 
 11       </StrictMode>
    ~~~~~~~~~~~~~~~~~~~
 12     )
    ~~~~~

  node_modules/@types/react/index.d.ts:1107:38
    1107     export type TransitionFunction = () => VoidOrUndefinedOnly;
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~
    The expected type comes from the return type of this signature.


Found 1 error.

error Command failed with exit code 1.

Signed-off-by: Logan McAnsh logan@mcan.sh

Signed-off-by: Logan McAnsh <logan@mcan.sh>
@MichaelDeBoey MichaelDeBoey changed the title chore: dont return from startTransition fix: don't return from startTransition Nov 28, 2022
@MichaelDeBoey MichaelDeBoey merged commit cd681fd into main Nov 28, 2022
@MichaelDeBoey MichaelDeBoey deleted the logan/start-transition-void branch November 28, 2022 19:39
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

Successfully merging this pull request may close these issues.

2 participants