Open crutchcorn opened 5 years ago
Closes #36
Additional to having the basic types from Flow typings copied over, I wanted to make sure the ref typings worked in scenarios like this:
ref
const fileUploader = React.useRef<null | InstanceType<typeof FileUploader>>(null);
So that things like:
fileUploader.startUpload
Would work without major refactoring.
During the implementation of this functionality, I realized that the React types are seemingly ill-equipt to handle modifying the ref with class methods. I will be making a follow-up PR upstream to see about this issue
Can you elaborate on how to use these typings while awaiting the review and merging?
You'll have to copy and paste these files and put them in your included "files"
Closes #36
Additional to having the basic types from Flow typings copied over, I wanted to make sure the
ref
typings worked in scenarios like this:So that things like:
Would work without major refactoring.
During the implementation of this functionality, I realized that the React types are seemingly ill-equipt to handle modifying the
ref
with class methods. I will be making a follow-up PR upstream to see about this issue