Skip to content

feat(shared-filesystem-storage): migrate ShareItem to functional TypeScript (#2053)#2049

Open
hodanoori wants to merge 1 commit into
masterfrom
hoda-react19-shares-item
Open

feat(shared-filesystem-storage): migrate ShareItem to functional TypeScript (#2053)#2049
hodanoori wants to merge 1 commit into
masterfrom
hoda-react19-shares-item

Conversation

@hodanoori
Copy link
Copy Markdown
Contributor

@hodanoori hodanoori commented May 18, 2026

Summary

Migrates ShareItem in the shared filesystem storage plugin from a class component to a functional TypeScript component as part of the React 19 migration epic (#1774).

Changes Made

  • Replace class component ShareItem with a functional TypeScript component in item.tsx
  • Replace componentDidMount, UNSAFE_componentWillReceiveProps, and componentWillUnmount with useEffect hooks managing polling via useRef
  • Convert inner RuleTooltip class component to a functional component
  • Convert startPolling and stopPolling to inline effect logic using useRef for the interval ID
  • Add TypeScript interfaces for Rule, ShareRulesState, Share, ShareNetwork, and ShareItemProps
  • Delete item.jsx
  • Add item.test.tsx with 18 unit tests covering row rendering, share network and rules display, dependency loading, and polling lifecycle

Related Issues

Screenshots (if applicable)

E82BCF1D-57EA-46DA-B1F5-666EB14B6CF1

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

@hodanoori hodanoori self-assigned this May 18, 2026
@hodanoori hodanoori changed the title feat(shared-filesystem-storage): migrate ShareItem to functional TypeScript (#2036) feat(shared-filesystem-storage): migrate ShareItem to functional TypeScript (#2053) May 18, 2026
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.

[Task](shares): Migrate shares/item.jsx

1 participant