Problems in different ways of react Loadable import

const Login = Loadable({ 
    loader: () => import("./components/Login"), 
    loading: () => <div>loading...</div> 
})

the above is very ok

the following modules are exported in different ways
weather/index.js

import view from "./views/weather.js"

export { view }
const Weather     = Loadable({ loader: () => {
    import { view as Weather } from "./weather"
    Weatherloaderweather/index
}, loading:     () => <div>loading...</div> })

const Weather = Loadable({ 
    loader: () => import('./views/weather.js').view, 
    loading:  () => <div>loading...</div>
})

you can

in the following ways
const Weather = Loadable({ 
    loader: () => import('./weather').then(({ view }) => view), 
    loading: () => <div>loading...</div> 
});
Menu