-
-
Notifications
You must be signed in to change notification settings - Fork 831
Correctly specify types for modern React contexts #10311
Conversation
clearing review req while in draft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 Looks great!
babel/babel#13779 and microsoft/TypeScript#45995 are inherently blocking this if we want to use the |
… t3chguy/react18/context # Conflicts: # src/HtmlUtils.tsx # src/SlashCommands.tsx # src/Unread.ts # src/components/structures/SpaceRoomView.tsx # src/components/views/elements/AppTile.tsx # src/components/views/elements/PersistentApp.tsx # src/components/views/room_settings/AliasSettings.tsx # src/components/views/rooms/RoomList.tsx # src/components/views/rooms/RoomSublist.tsx # src/components/views/settings/DevicesPanel.tsx # src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx # src/stores/room-list/SlidingRoomListStore.ts # test/stores/room-list/SlidingRoomListStore-test.ts
It looks like these issues haven't seen meaningful updates since 2021. 😕 Possibly a stupid question but is there any alternative that would not make us block the React 18 update on them? |
@Johennes we would either need to ditch class property initialization or typescript constructor properties as they do not play well together once you enable support for the |
Hm, sounds like we couldn't realistically do either since both appear to be widely used? Is there a way in which we could avoid the |
Maybe with a bunch of ts-ignores, but I would advise against that |
As mentioned in the chapter sync today, element-hq/element-web#26079 may or may not help unblock this. I haven't done any explorations into that direction so far though. |
Can I help somehow with this? React 18 is a must today. |
@dzienisz sure if you know of a way around babel/babel#13779 & microsoft/TypeScript#45995 whilst allowing the use of the |
My quick advice would be to ts-ignore it and write a comment with a link to this issue. Typescript is just a superset of JavaScript that, in my option it is to help you write a bug free code. In this case, Typescript has a bug, and it should not block you from upgrading this app. |
Sure, I will try to run the project and jump into it, or we can meet one, and you could make me a quick into. What do you think? |
For https://github.com/vector-im/wat-internal/issues/65
Requires element-hq/element-web#24764
This change is marked as an internal change (Task), so will not be included in the changelog.