Git Product home page Git Product logo

imooc-jira's Introduction

2021 必修:React + React Hook + TS 最佳实践仿 Jira 企业级项目

Hi,同学们好,感谢大家的信任购买这个课程。查看课程对应代码请 checkout 到对应的 commit

这里是配套课件的链接:点击我查看配套课件

imooc-jira's People

Contributors

davidli-oneflick avatar sindu12jun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imooc-jira's Issues

引入jira-dev-tool后终端一直报错

我引入了jira-dev-tool后终端一直在报antd.css的错,但是引入了antd也没有解决问题。并反复确认过.env等两个文件。并切换过多个版本的jira-dev-tool都解决不了问题。这应该怎么解决啊老师? @sindu12jun

build报错

$ craco build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

./src/context/auth-context.tsx 1:1245
Module parse failed: Unexpected token (1:1245)
File was processed with these loaders:

  • ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
    You may need an additional loader to handle the result of these loaders.

import _regeneratorRuntime from"F:/study/react/jira/node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator";import _asyncToGenerator from"F:/study/react/jira/node_modules/babel-preset-react-app/node_modules/@babel/runtime/he
lpers/esm/asyncToGenerator";import React,{useContext}from"react";importas auth from"auth-provider";import{http}from"../utils/http";import{useMount}from"../utils";import{useAsync}from"../utils/use-async";import{FullPageErrorFallback,FullPageLoadin
g}from"../components/lib";import{jsx as _jsx}from"react/jsx-runtime";var bootstrapUser=/
#PURE/function(){var _ref=_asyncToGenerator(/#PURE/_regeneratorRuntime.mark(function _callee(){var user,token,data;return _regeneratorRuntime.wrap(
function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:user=null;token=auth.getToken();if(!token){_context.next=7;break;}_context.next=5;return http("me",{token:token});case 5:data=_context.sent;user=data.user;case 7:retur
n _context.abrupt("return",user);case 8:case"end":return _context.stop();}}},_callee);}));return function bootstrapUser(){return _ref.apply(this,arguments);};}();var AuthContext=/
#PURE/React.createContext(undefined);AuthContext.displayName="
AuthContext"AuthContext.displayName="AuthContext";export var AuthProvider=function AuthProvider(_ref2){var children=_ref2.children;var _useAsync=useAsync(),user=_useAsync.data,isLoading=_useAsync.isLoading,isIdle=_useAsync.isIdle,error=_useAsync.e
rror,isError=_useAsync.isError,run=_useAsync.run,setUser=_useAsync.setData;var login=function login(form){return auth.login(form).then(setUser);};var register=function register(form){return auth.register(form).then(setUser);};var logout=function l
ogout(){return auth.logout().then(function(){return setUser(null);});};useMount(function(){run(bootstrapUser());});if(isIdle||isLoading){return/
#PURE/_jsx(FullPageLoading,{});}if(isError){return/#PURE/_jsx(FullPageErrorFallback,{error:
error});}return/
#PURE*/_jsx(AuthContext.Provider,{children:children,value:{user:user,login:login,register:register,logout:logout}});};export var useAuth=function useAuth(){var context=useContext(AuthContext);if(!context){throw new Error("useA
uth必须在Authprovider中使用");}return context;};

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

react-script 环境变量问题

react-script start 启动时,定义的环境变量在react中被过滤了,必须要满足正则匹配,即REACT_APP_开头。

请求bug

我遇到一个问题,就是点击project-list删除按钮的时候,useHttp的http请求同时触发了3次,第一次method是delete,后面2次是默认get,delete还没请求出去,就被覆盖了,造成Netword没有删除的请求,只有get请求 @sindu12jun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.