Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReactComponent is too tightly coupled to specific version of React #7213

Open
MarcSkovMadsen opened this issue Aug 31, 2024 · 5 comments
Open
Labels
more info needed type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

I've been hit several times by the fact that the Panel ReactComponent uses a specific version of React. Currently 18.3.1.

  • The specific version is not publicly documented.
  • It's not explained that you will have to use React library versions compatible with the exact version of React Panel is providing
  • If you import versions of React libraries that are not compatible with Panels version of React you get hard to understand error messages and need guidance from Philipp that versioning is the problem.
  • There is a high risk that custom ReactComponent will only work for a narrow band of Panel versions because Panel will and should keep the react version updated. This makes these components hard to maintain.

Please remove the issues above.

@MarcSkovMadsen MarcSkovMadsen added the TRIAGE Default label for untriaged issues label Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title Make ReactComponent capable of supporting multiple Panel versions Make ReactComponent easy to use and robust Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title Make ReactComponent easy to use and robust ReactComponent is too tightly tied to version of React used by Panel Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen added type: enhancement Minor feature or improvement to an existing feature and removed TRIAGE Default label for untriaged issues labels Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen added this to the Wishlist milestone Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title ReactComponent is too tightly tied to version of React used by Panel ReactComponent is too tightly coupled to React version Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title ReactComponent is too tightly coupled to React version ReactComponent is too tightly coupled to specific React version Aug 31, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title ReactComponent is too tightly coupled to specific React version ReactComponent is too tightly coupled to specific version of React Aug 31, 2024
@philippjfr
Copy link
Member

philippjfr commented Sep 1, 2024

The react version can be configured by declaring _react_version. Apart from improving documentation I'm not sure what you're suggesting.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Sep 1, 2024

It is not clear to me if I can distribute a package using a React version not the same as the one the current version of Panel uses. And not the same version as some other ReactComponent extension version.

@philippjfr
Copy link
Member

philippjfr commented Sep 1, 2024

It is not clear to me if I can distribute a package using a React version not the same as the one the current version of Panel uses. And not the same version as some other ReactComponent extension version.

As I mentioned above, there is no such thing as the "version of React that Panel uses", the version is configurable on the component itself by setting the _react_version.

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Sep 3, 2024

Ok. Then we should document it. Because if extension developers do not set this value themselves their extension packages will only work for very specific versions of Panel.

@philippjfr
Copy link
Member

Absolutely, it is documented as part of the compile and bundle how to guide now but should be made more prominent in the reference guide as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants