-
Notifications
You must be signed in to change notification settings - Fork 20
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
+ Typescript Cleanup #118
+ Typescript Cleanup #118
Conversation
example/src/XmtpContext.tsx
Outdated
@@ -9,7 +9,7 @@ const XmtpContext = createContext<{ | |||
setClient: () => {}, | |||
}); | |||
export const useXmtp = () => useContext(XmtpContext); | |||
export function XmtpContextProvider({ children }) { | |||
export const XmtpContextProvider: FC<any> = ({ children }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think FC<PropsWithChildren>
would work better here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh yes, I missed that..
type Props = { | ||
children: ReactNode | ||
} | ||
export const XmtpContextProvider: FC<Props> = ({ children }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, PropsWithChildren
is an official export from react
🎉 This PR is included in version 1.16.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
this will cleanup most of the typescript issue in the example folder