gosling.js icon indicating copy to clipboard operation
gosling.js copied to clipboard

Any plan to upgrade the React version for Gosling React components?

Open timtong1982 opened this issue 1 year ago • 4 comments

timtong1982 avatar Sep 21 '22 16:09 timtong1982

Hi @timtong1982, thank you for reaching out!

The React version of Gosling is dependent on HiGlass. There is an open PR to upgrade the React version of HiGlass to v18 (https://github.com/higlass/higlass/pull/1104). Once it is merged into the main branch of HiGlass and released, I will upgrade the React version in Gosling.

I will follow up on the PR to see when/if it could be merged.

sehilyi avatar Sep 27 '22 20:09 sehilyi

Thank you @sehilyi !

timtong1982 avatar Sep 29 '22 19:09 timtong1982

Hi @sehilyi ! Do you know if there is any news regarding updating HiGlass to a more recent version of React? I am only able to run Gosling without the "StrictMode" of React. Otherwise, I get the error below. From the error I could interpret that is due to the old syntax of Gosling.

Error

Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

Move code with side effects to componentDidMount, and set initial state in the constructor. Please update the following components: HiGlassComponent

Dependencies
{
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.1.1",
    "@testing-library/user-event": "^13.5.0",
    "@upsetjs/react": "^1.11.0",
    "gosling.js": "^0.13.2",
    "higlass": "^1.13.3",
    "http-proxy-middleware": "^2.0.6",
    "install": "^0.13.0",
    "jszip": "^3.10.0",
    "lodash": "^4.17.21",
    "npm-run-all": "^4.1.5",
    "pixi.js": "^6.5.10",
    "plotly.js-cartesian-dist-min": "^2.12.1",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-plotly.js": "^2.5.1",
    "react-router-dom": "^6.3.0",
    "react-scripts": "5.0.1",
    "react-spinners": "^0.12.0",
    "react-table": "^7.8.0",
    "web-vitals": "^2.1.4"
  }

mwittep avatar Jan 09 '24 07:01 mwittep

Hi @mwittep and @timtong1982, I forgot to follow up on this issue, and we now support the most recent React versions. The editor implemented in this repo also uses React 18.

@mwittep, The StrictMode does not display anything but shows potential warning and error messages, so it is correct to use Gosling without StrictMode. The warning message about UNSAFE_componentWillMount is coming from the fact that HiGlass still uses old React syntax, but so far we have not found any issues with that in multiple Gosling-based applications. So, I think you can safely ignore the warning message.

sehilyi avatar Jan 09 '24 15:01 sehilyi