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 type definitions for page components that take props #4219

Merged
merged 2 commits into from Jan 22, 2022

Conversation

corbt
Copy link
Contributor

@corbt corbt commented Jan 20, 2022

Sometimes it's convenient for a Redwood page to take props. I use this to pass in optional props so I can mock specific states in Storybook (see https://github.com//zorro-project/zorro/blob/7fc3c1abec3e5296e8cc2e1a5164a177b9d7a16d/redwood/web/src/pages/SignUp/VideoPage/VideoPage.tsx#L15).

Right now, if a Redwood page takes props it fails the <Route> typechecks. This PR loosens up the typecheck so it passes.

Sometimes it's convenient for a Redwood page to take props. I use this to pass in optional props so I can mock specific states in Storybook (see https://github.com//zorro-project/zorro/blob/7fc3c1abec3e5296e8cc2e1a5164a177b9d7a16d/redwood/web/src/pages/SignUp/VideoPage/VideoPage.tsx#L15).

Right now, if a Redwood page takes props it fails the `<Route>` typechecks. This PR loosens up the typecheck so it passes.
@thedavidprice thedavidprice merged commit 84a4a46 into redwoodjs:main Jan 22, 2022
@jtoar jtoar added this to the next-release milestone Jan 22, 2022
@thedavidprice
Copy link
Contributor

Thanks @corbt!

dac09 added a commit that referenced this pull request Jan 25, 2022
…s-setup

* 'main' of github.com:redwoodjs/redwood: (87 commits)
  Update scripts tsconfig (#4258)
  Update dependency @types/aws-lambda to v8.10.92 (#4260)
  Update dependency @apollo/client to v3.5.8 (#4262)
  Update dependency msw to v0.36.7 (#4252)
  Update typescript-eslint monorepo to v5.10.1 (#4256)
  Update dependency webpack-cli to v4.9.2 (#4254)
  Update dependency @supabase/supabase-js to v1.29.4 (#4253)
  Update dependency supertokens-auth-react to v0.18.4 (#4255)
  Update dependency ts-morph to v13.0.3 (#4251)
  Update dependency supertokens-auth-react to v0.18.3 (#4248)
  Update dependency esbuild to v0.14.13 (#4249)
  Fixed netlify api config (#4247)
  Add storybook ci option to test that Storybook starts "ok" (#3515)
  Update dependency react-hook-form to v7.25.0 (#4245)
  Update dependency firebase-admin to v10.0.2 (#4244)
  Fix type definitions for pages that take props (#4219)
  update yarn.lock
  v0.42.1
  update yarn.lock
  Pin dependency @types/yargs to v16.0.4 (#4243)
  ...
@jtoar jtoar modified the milestones: next-release, test Jan 27, 2022
@thedavidprice thedavidprice modified the milestones: next-release, v0.43.0 Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

None yet

4 participants