rocky-191 / react-juejin Goto Github PK
View Code? Open in Web Editor NEW使用React构建精简版的掘金网站
使用React构建精简版的掘金网站
➜ react-juejin git:(master) npm i
npm WARN deprecated [email protected]: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react-router-dom@^4.4.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'antd-demo'
npm ERR! notarget
@可以添加lazy懒加载哈哈哈
main.js
/// React 16.6 or higher
// 使用Suspense做Code-Splitting
const withSuspense = (Component) => {
return (props) => (
<Suspense fallback={null}>
<Component {...props} />
</Suspense>
)
}
const Home = withSuspense(lazy(() => import("../home/index")))
const Post = withSuspense(lazy(() => import("../post/index")))
const Dynamic = withSuspense(lazy(() => import("../dynamic/index")))
const Topic = withSuspense(lazy(() => import("../topic/index")))
const Brochure = withSuspense(lazy(() => import("../brochure/index")))
const Activity = withSuspense(lazy(() => import("../activity/index")))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.