You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Not many people will run into this problem, but my preference of writing "universal" libraries (to be used in Mithril and React), in TypeScript, using Meiosis for state management, combined with Mithril's Stream functions lead to some problems in projects such as dialogic, glissando and use-stream.
The problem crops up in React projects where eslint will suddenly complain: "React.Fragment cannot be used as a JSX component" (and so on, for many components).
I've spent ages to find the cause of problem. It happens when mithril.d.ts is in node_modules, because one of my libraries has marked Mithril as dependency.
My workaround so far is to move Mithril to devDependencies for React libraries, but that removes the linkage to Stream's type definition in IDE's as Visual Studio Code.
For my purpose the Stream definitions would be better placed in a separate type definition.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Not many people will run into this problem, but my preference of writing "universal" libraries (to be used in Mithril and React), in TypeScript, using Meiosis for state management, combined with Mithril's Stream functions lead to some problems in projects such as dialogic, glissando and use-stream.
The problem crops up in React projects where
eslint
will suddenly complain: "React.Fragment cannot be used as a JSX component" (and so on, for many components).I've spent ages to find the cause of problem. It happens when
mithril.d.ts
is innode_modules
, because one of my libraries has marked Mithril as dependency.My workaround so far is to move Mithril to devDependencies for React libraries, but that removes the linkage to Stream's type definition in IDE's as Visual Studio Code.
For my purpose the Stream definitions would be better placed in a separate type definition.
The text was updated successfully, but these errors were encountered: