Python Return Function From Use Effect React With Async