# react-async-component

2 min read
Table of Contents

异步组件

定义

使用场景

注意事项

import React, { useRef, useState, Suspense,lazy } from 'react';
import Card from '~/components/mdx/component/Async/Card/Card'
import { Skeleton } from '~/components/mdx/component/skeleton'
const App: React.FC = () => {

  return (
    <>
      <Suspense fallback={<Skeleton />}>
        <Card />
      </Suspense>
    </>
  );
}

export default App;
My avatar

Thanks for reading my blog post! Feel free to check out my other posts or contact me via the social links in the footer.


More Posts

Comments