Skip to content

refactor: move to functional components#280

Merged
erickzhao merged 14 commits intomainfrom
fn-log-table
Mar 26, 2026
Merged

refactor: move to functional components#280
erickzhao merged 14 commits intomainfrom
fn-log-table

Conversation

@erickzhao
Copy link
Copy Markdown
Member

@erickzhao erickzhao commented Nov 7, 2025

This is a bit difficult to review but I mostly spot checked to validate the output.

The most crucial component here is log-table.tsx, which was previously using UNSAFE_componentWillReceiveProps to handle state updates.

(Most of the other ones are trivial.)

@erickzhao erickzhao marked this pull request as ready for review January 13, 2026 23:52
@erickzhao erickzhao changed the title refactor: make log-table a functional component refactor: move to class components Mar 9, 2026
@erickzhao erickzhao changed the title refactor: move to class components refactor: move to functional components Mar 12, 2026
@erickzhao erickzhao requested a review from a team March 25, 2026 19:09
Copy link
Copy Markdown
Contributor

@samuelmaddock samuelmaddock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few cases where componentDidMount were refactored to useEffect with dependencies. This may cause component initialization logic to run multiple times.

If sleuth seems to behave normally, it's probably fine to merge.

return () => {
unmountListener();
};
}, [props.state]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like an exact match to the previous componentDidMount behavior, but it might be fine? This will cause Sleuth.setupSuggestionsUpdated to be called multiple times whenever props.state changes.

@erickzhao erickzhao merged commit b47cb61 into main Mar 26, 2026
6 checks passed
@erickzhao erickzhao deleted the fn-log-table branch March 26, 2026 06:04
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.

3 participants