pig800509

Results 13 comments of pig800509

@shawngrona Just remove options section , in /example there is "download-swagger-json.sh",add these code into .sh : `bash -c "node ./rebuildJSON.js"` and this is my rebuildJSON.js ``` var jsonfile = require('jsonfile')...

```ts const { execute } = useAsyncCallback(fetchOptionsFromRemote); const fetchOptions = useCallback(execute,[]); useEffect(() => { fetchOptions().then(() => { store.selectedValue = null; }); }, [fetchOptions]); ``` or use `setResult` in option?

@freewind ``` const fetchOptions = useAsync(async () => { store.selectedValue = null; //do something here. return await fetchOptionsFromRemote(); }, []) ``` What is different with "onLoad" options?

@David-Sellen I don't see it is solved by now, which version do you use? I run `serverless openapi generate -o swagger.json -f json` and this is path of swagger.json ```...

@David-Sellen I see, thank you so much.

```jsx const SomethingContainer () => { const [conditionUnmount, setUnmount] = useState(false); useEffect(()=>{ return ()=>{ if(conditionUnmount){ //clean up here } } }) return {!unmount && } } ```