telekom / scale

Scale is the digital design system for Telekom products and experiences.
https://telekom.github.io/scale/
Other
374 stars 82 forks source link

'Scale and React' documentation page is outdated and misleading #1820

Closed tischrei closed 1 year ago

tischrei commented 1 year ago

We are currently trying to get started with the latest version of Scale. The documentation of the React-based stuff seems to be outdated. For instance the page:"https://telekom.github.io/scale/?path=/docs/setup-info-scale-and-react--page" covers a documentation about "Custom Events" which can be dropped completely from my point of view. We noticed that most listed packages e.g. reactify-wc are not compatible with the latest React version or have other issues like not updated at all etc..

Beside of that, the event functionality can be used without wrappers at all. It is also noticed that React's 'onClick' and other Events does not work without wrapper-tools which is not true anymore.

It would be nice for other starters that the missleading page will be reworked at all that others do not fall in the same trap as we did.

Thanks in advance.

felix-ico commented 1 year ago

Hi @tischrei and thanks for opening the issue. I agree, if some of the documentation is outdated we should definitely update it.

e.g. reactify-wc are not compatible with the latest React version

these we should probably remove but our custom-react wrapper (the last listed) should work with latest react version.

Out of curiosity, what react version are you using in your project? Custom elements are partially supported on react 18.2 (with supposed full support on the experimental branch and in 19 https://custom-elements-everywhere.com/#react), so while the components do render there may still be issues if you are on react 18, or you may have to set up eventlisteners differently. I have made a minimal code sandbox to show a few different ways components and events could look like in a react app, with and without wrapper package -> https://codesandbox.io/s/scale-components-react18-with-wrapper-forked-xgoju8?file=/src/App.js

tischrei commented 1 year ago

It runs properly now. Thanks.