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 was archived by the owner on Apr 8, 2020. It is now read-only.
import {IFormInput} from "./IFormInput";
@observer
export default class FormInputGroup extends React.Component<IFormInput, any>
{
...trimmed react code
}
Webpack builds everything fine and the application works, however when I make a change and the hotloader fires I get several errors around the interface:
The text was updated successfully, but these errors were encountered:
I redid how I import things and now it seems to work fine:
Exporting all components/interfaces in a single file:
export * from "./Form";
export * from "./FormTextBox";
//export * from "./FormDropDown";
export * from "./FormInputGroup";
export * from "./FormLabel";
export * from "./FormSubmitButton";
export * from "./IFormInput";
export * from "./IFormModel";
And then importing via:
import * as FormComponents from '../../Forms/FormImports';
Glad you got it fixed. I'm not aware of any specific technical issues with using TypeScript that way, but will keep a lookout in case anyone else reports troubles.
This might be my setup, but hotloading React modules crashes if you reference an interface:
IFormInput.ts
React Module
Webpack builds everything fine and the application works, however when I make a change and the hotloader fires I get several errors around the interface:
The text was updated successfully, but these errors were encountered: