[Solved] Ant design page reloading css rendering delay

Actually, based on And Design Doc about getting a start, You could use babel plugin for automatic loading used components like below, it is a recommended way: // .babelrc or babel-loader option { “plugins”: [ [“import”, { “libraryName”: “antd”, “libraryDirectory”: “es”, “style”: “css” }] // `style: true` for less ] } By using this way … Read more

[Solved] Smart assuming of variable type

You can use https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates But you need to pass the variable const isLoaded = (response: ResponseData | undefined): response is ResponseData => { // some complex logic to check if the data is loaded and correct return !isLoading && !!data && Object.keys(data).length > 0 } return ( <> <div>My data title:</div> {isLoaded(data) && <div>{data.title}</div>} // … Read more