【文件属性】:
文件名称:testing-jest:有关如何使用Jest测试的Pluralsight课程
文件大小:134KB
文件格式:ZIP
更新时间:2021-02-19 05:48:47
learning pluralsight training-project JavaScript
同构React
具有所有最佳实践且简洁的Starter同构React应用程序
关于申请
该应用程序是一个基本的API客户端,它从外部API(在本例中为*)收集数据并生成同构的单页应用程序(SPA)。
为什么同构React?
好问题!
使用React / Redux作为主要应用程序引擎
支持热重载和服务器渲染!
使用React Router(结合了服务器渲染功能,实在是太神奇了)
没有绒毛,只有好东西
入门
克隆存储库
安装依赖项npm install && npm run postinstall
运行开发服务器npm run start-dev
导航到应用程序的URL http://localhost:3000/
用法
启用/禁用服务器渲染
服务器渲染很棒,但是有时我们会在渲染出现错误时禁用它,而我们希望在客户端中对其进行故障排除。 此设置通过--use
【文件预览】:
testing-jest-master
----public()
--------index.html(895B)
----webpack.config.dev.babel.js(2KB)
----src()
--------services()
--------getStore.js(2KB)
--------sagas()
--------components()
--------__tests__()
--------App.jsx(1KB)
--------index.jsx(3KB)
--------reducers()
--------App.spec.js(275B)
----.babelrc(228B)
----webpack.config.prod.babel.js(2KB)
----__mocks__()
--------isomorphic-fetch.js(156B)
----README.md(3KB)
----data()
--------api-real-url.js(578B)
--------mock-questions.json(25KB)
----.gitignore(913B)
----server()
--------index.jsx(8KB)
----package-lock.json(435KB)
----package.json(2KB)