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 Set wrapper type so you can have an array of wrappers #9314

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Oct 18, 2023

Fixes #9313

See the linked issue for details, but in short this PR lets you do this without type errors (notice the array of wrappers):

const Routes = () => {
  return (
    <Router>
      <Set wrap={[Wrapper]}>
        <Route path="/" page={HomePage} name="home" />
      </Set>
      <Route notfound page={NotFoundPage} />
    </Router>
  )
}

NOTE
This could technically be considered a breaking change.
People might have worked around this issue using // @ts-expect-error - wrapper types are broken. For those users that comment would possibly now break their builds because there's no error to expect anymore.

@Tobbe Tobbe added the release:fix This PR is a fix label Oct 18, 2023
@Tobbe Tobbe added this to the next-release-patch milestone Oct 18, 2023
@Tobbe Tobbe merged commit c44a524 into redwoodjs:main Oct 19, 2023
31 checks passed
@Tobbe Tobbe deleted the tobbe-set-wrapper-type branch October 19, 2023 11:05
@jtoar jtoar modified the milestones: next-release-patch, v6.4.0 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Red squiggle for <Set> with array of wrappers
2 participants