Migrate codebase to TypeScript with React 19 support#274
Open
ryanseddon wants to merge 14 commits intomasterfrom
Open
Migrate codebase to TypeScript with React 19 support#274ryanseddon wants to merge 14 commits intomasterfrom
ryanseddon wants to merge 14 commits intomasterfrom
Conversation
🦋 Changeset detectedLatest commit: 120f987 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- Add TypeScript with strict mode - Convert .jsx files to .tsx - Remove prop-types in favor of TypeScript types - Add TypeScript declaration output (dist/index.d.ts) - Support React 16.8+ through 19+ in peerDependencies
fix: remove duplicate React 19 in peerDependencies
- Remove unsafe 'as any' cast in Frame.tsx using proper createRef typing - Make Content children optional (ReactNode instead of ReactElement) - Add Frame class and Content exports to index.d.ts - Add tests for named Frame export, nodeRef prop, and invalid mountTarget
- Use useLayoutEffect to maintain sync lifecycle behavior - Keep isMounted ref pattern for mount/update detection
- Remove unsafe 'as any' cast in Frame.tsx using proper createRef typing - Make Content children optional (ReactNode instead of ReactElement) - Add Frame class and Content exports to index.d.ts - Refactor context test to use modern functional component with useContext
…erscore prefix - Simplify Frame component to destructure props directly in function signature - Add onMount and onUpdate as modern alternatives to deprecated lifecycle callbacks - Add JSDoc @deprecated annotations to contentDidMount and contentDidUpdate - Update Frame.tsx, Content.tsx, and index.d.ts with new props - Update tests to use new onMount/onUpdate props - Use createRef instead of unsafe 'as any' cast
- Make FrameContext document/window optional instead of casting empty objects - Remove unsafe 'as HTMLIFrameElement' assertion using proper useRef typing - Update index.d.ts to export Frame/Content as functions not classes - Add nodeRef prop to FrameComponentProps in index.d.ts - Replace class component test with modern functional component
fa1ce07 to
120f987
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates all source files from JavaScript/JSX to TypeScript/TSX, adding full type safety while maintaining backward compatibility with React 16.8+.
Key changes:
Deprecations:
These deprecated props will be removed in a future major version.