I'm writing a React (well, Preact) app in TypeScript. Page components want to AJAX in their data on load. But I don't know how to do it in a nice way. Maybe there's a convention that I've missed?
-
-
This is much like your Loader superclass solution, but I find I can usually abstract away more boilerplate with a higher-order component.
-
I guess it's time for me to do that. I wrote Loader only a few hours into TypeScript, so I was afraid of going full-on HOC. But it should be no problem now!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.