Skip to content

Fix deprecated React/Apollo Client console warnings - #679

Merged
conorheffron merged 6 commits into
mainfrom
copilot/resolve-console-warnings-errors
Jul 4, 2026
Merged

Fix deprecated React/Apollo Client console warnings#679
conorheffron merged 6 commits into
mainfrom
copilot/resolve-console-warnings-errors

Conversation

Copilot AI commented May 23, 2026

Copy link
Copy Markdown
Contributor

Multiple console warnings/errors from deprecated or removed APIs: findDOMNode deprecation via reactstrap's Collapse/Navbar, Apollo Client 3.14+ uri shorthand removal, React Router v7 dropping forceRefresh, and unreachable dead code with invalid HTML tags in Donate.js.

Changes

App.js

  • Apollo Client: Replace deprecated uri shorthand with explicit HttpLink. Apollo Client 3.14+ emits console.warn when uri is passed directly to ApolloClient:
    // Before
    new ApolloClient({ uri: '/graphql', cache: new InMemoryCache() })
    
    // After
    new ApolloClient({ link: new HttpLink({ uri: '/graphql' }), cache: new InMemoryCache() })
  • ApolloClient instantiation: Moved from render() to constructor — was creating a new instance (and re-emitting warnings) on every render
  • forceRefresh prop: Removed from <BrowserRouter> — prop was dropped in React Router v7; passing it generates unknown-prop warnings

Donate.js

  • Removed unreachable second return block containing invalid HTML elements (<h8>, <h7>, <h11>) that would produce browser console errors

Copilot AI and others added 2 commits May 23, 2026 18:57
Copilot AI changed the title [WIP] Fix warnings and errors from deprecated React functions Fix deprecated React/Apollo Client console warnings May 23, 2026
Copilot AI requested a review from conorheffron May 23, 2026 19:06
@conorheffron
conorheffron requested a review from Copilot May 24, 2026 14:34
@conorheffron conorheffron added ui-frontend javascript Pull requests that update Javascript code labels May 24, 2026

Copilot AI left a comment

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.

Pull request overview

This PR aims to eliminate frontend console warnings caused by deprecated/removed APIs across React Router, Apollo Client, and invalid/unreachable React markup.

Changes:

  • Updates Apollo Client setup to use an explicit HttpLink and instantiates the client once in App’s constructor.
  • Removes the deprecated forceRefresh prop from the router configuration.
  • Deletes unreachable JSX in Donate.js that included invalid HTML heading tags.
  • Adds @testing-library/dom to the frontend dependency set (with corresponding lockfile updates).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
frontend/src/App.js Switches Apollo Client creation to HttpLink and makes it a single instance; removes forceRefresh usage.
frontend/src/components/Donate.js Removes unreachable duplicate return block containing invalid HTML tags.
frontend/package.json Adds @testing-library/dom to dependencies.
frontend/package-lock.json Updates lockfile to include new dependency and includes additional dependency resolution/version changes.
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/package.json
Comment thread frontend/package-lock.json
@conorheffron
conorheffron marked this pull request as ready for review June 14, 2026 15:18
@conorheffron

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

@conorheffron

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and pushed the merge commit in f6db9a8.

Copilot AI commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved in f6db9a8. The branch already contains the current main, so there are no merge conflicts left on this PR; GitHub is only showing checks running/blocked rather than a conflict state.

@conorheffron
conorheffron merged commit a2a3294 into main Jul 4, 2026
12 of 14 checks passed
@conorheffron
conorheffron deleted the copilot/resolve-console-warnings-errors branch July 4, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code ui-frontend

Projects

Development

Successfully merging this pull request may close these issues.

UI: Resolve warnings & errors in console related to deprecated react functions etc

3 participants