Giter Site home page Giter Site logo

javaluo / react-luo Goto Github PK

View Code? Open in Web Editor NEW
311.0 13.0 72.0 6.59 MB

React Automatically - 保持最新技术 react18 hooks router6 webpack5 babel7 antd4

Home Page: https://isluo.com/work/pwa/

License: MIT License

JavaScript 86.93% CSS 6.02% HTML 0.99% Less 6.06%
reactjs redux babel7 es10 prettier antdesign react-router-v5 webpack5

react-luo's Introduction

嘿,很高兴见到你 👋

我是搞前端开发的,一直想学习并掌握three.js/webGL/GLSL着色器,我觉得这是通往高阶工程师的必经之路,这是突破瓶颈的难关。
我希望能静下心做一些真正的作品。

💬 有什么需要帮忙的吗?
📫 请给我留言

react-luo's People

Contributors

dreamerryao avatar javaluo avatar kant avatar lonemes 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

react-luo's Issues

ajax请求如何记录

目的是 请求一次服务,然后记录下来,加上时间戳,然后发送服务端,可以在哪里写?

有很多路由的时候,有什么简便的写法么?

const Home = Loadable({
loader: () => import(/* webpackChunkName:'home' */ '../home'),
loading: Loading, // 自定义的Loading动画组件
timeout: 10000, // 可以设置一个超时时间(s)来应对网络慢的情况(在Loading动画组件中可以配置error信息)
});
我这样写报加载错误
let [ Login , Root] = [
"../loginPage/index",
"../root/index"
].map(item => {
let component = Loadable({
loader: () => import(${item}),
loading: Loading, // 自定义的Loading动画组件
timeout: 10000 // 可以设置一个超时时间(s)来应对网络慢的情况(在Loading动画组件中可以配置error信息)
})
return component
})

在线主题切换

luo哥,我现在需要做一个功能 :程序提供多套主题模板,用户可以在线切换主题,这样的功能应该怎么做呢,有思路可以参考一下么?多谢!!!

nginx 代理的问题

我现在把工程发布之后,需要使用nginx 做代理,但是怎么配置都无法成功,这是我的location 配置,需要怎么更改呢? 谢谢
upstream dist {
server localhost:8888 weight=3;
}
server {
listen 8082;
server_name localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

   location /dist {
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Nginx-Proxy true;	
    proxy_set_header Connection "";
        proxy_pass http://dist;
        root   html;
        index  index.html index.htm;
    }

是否添加日志模块呢

罗哥,我看到目前项目里没有加日志模块,如果想添加日志模块是通过express的中间件还是redux 中间件来写呢,哪个更简单点呢

请指点,万分感激

您好,首先您搭的这个框架功能很齐全,但我克隆后,想在这个基础上为redux的connect方法配置装饰器,比如下面这种写法
@connect(
state => ({
num:state.app.num
}),
dispatch =>({
action: bindActionCreators(actionA, dispatch)
});
这个要如何配置,您方便更新下吗?

服务器记录路由跳转

有什么办法可以在服务器记录路由跳转呢? 就是 react router 的变化 ,我目前只想到把工程拆分多页面,,用experss 做路由分发,罗哥有啥其他的思路么?谢谢

您好,我想再次请教个问题,麻烦了

export const editProblem=(obj)=>{
Fetchapi.newPost(
'url',obj
).then(
msg => {
console.log(msg);
dispatch(xxxAction);
}
).catch(() => {
message.error('网络错误,请重试');
});
}
这个我写的一个函数(写在了一个公共函数的js文件里),我想在异步时的then()函数里请求成功时发送action,如上,但提示dispatch未定义,请问我怎么把dispatch弄进来

求大神指点,这个项目怎么配置装饰器

您好,首先您搭的这个框架功能很齐全,但我克隆后,想在这个基础上为redux的connect方法配置装饰器,比如下面这种写法
@connect(
state => ({...state.todos.toJS()}),
dispatch =>({
action: bindActionCreators(actionA, dispatch)
});
这个要如何配置,您方便更新下吗?

批量引入图片

luo哥你好, 碰到个批量引入图片的问题 ,按照之前的方式,图片需要 import 引入,一个一个引入的话,得写一堆,目前 我是通过 require('../../../images/12star/star_' + item.id + '.png'); 这种替换 id 拼字符串的来写的,有什么更好的方法呢,十分感谢!!!

开发ts版本

看到这个基于最新技术维护的仓库很兴奋,内部样例代码也确实对新人会有很大帮助。
ts 目前已经稳定,我希望基于此仓库维护对应的ts版本,同时删除ui组件库依赖,因为我并不倡议在模版中限制ui库的使用
如果有需要,我也可以帮助完成对应ts版本的开发工作。

关于项目构建的问题

luo哥你好,我看工程项目只有开发环境运行,如果我要切换一下开发环境改怎么改呢?对这些还不大了解,还请赐教

引入第三方js 的问题

luo哥你好,请教一个问题,我之前的项目是通过 html 模板里面link 入一个第三方js ,那在这个工程里要怎么办呢?

help!

请问我在yarn start的时候 报错
image
该怎么办呢 以前没有接触过类似的东西没有头绪

内存溢出

好像项目大了之后,webpack编译会有内存溢出问题

linux 下生产压缩抱错

luo哥,你好,我在windows 环境下打包代码就不报错,在linux 下打包就报下面这个错,这是什么原因呢?

ERROR in vendors.js from UglifyJs
Unexpected token: name (urlParts) [vendors.js:62274,4]

ERROR in vendors.js from UglifyJs
Unexpected token: name (urlParts) [vendors.js:62274,4]
Child html-webpack-plugin for "index.html":

可以加入dll打包吗

目前用的你这个脚手架在做东西,但是每次代码变化重新编译打包就要等很久,可以优化一下吗

这个脚手架上怎么设置请求代理?

service.js中加了如下代码

const proxy = require('http-proxy-middleware');//引入代理中间件
const apiProxy = proxy('/api', {
        target: 'https://api.douban.com',
        changeOrigin: false
    });
    app.use('/api', apiProxy);

image
image

引用相对路径图片 报错

Module not found: Error: Can't resolve 'img/1.png' in '/Users/chenxiaogang/workspace/hupu/games_frontend/offline_react/src/container/bbs/admire/admire_1'

切换成url 模式 模式报错

您好,今天刚刚拉下您的项目,在开发模下从hashURL切换到url,强制刷新页面会报错
内容如下

Error: invalid argument
    at pathToArray (E:\github\react-luo\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
    at MemoryFileSystem.readFileSync (E:\github\react-luo\node_modules\memory-fs\lib\MemoryFileSystem.js:103:13)
    at MemoryFileSystem.(anonymous function) [as readFile] (E:\github\react-luo\node_modules\memory-fs\lib\MemoryFileSystem.js:300:34)
    at app.get (E:\github\react-luo\server.js:47:31)
    at Layer.handle [as handle_request] (E:\github\react-luo\node_modules\express\lib\router\layer.js:95:5)
    at next (E:\github\react-luo\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (E:\github\react-luo\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (E:\github\react-luo\node_modules\express\lib\router\layer.js:95:5)
    at E:\github\react-luo\node_modules\express\lib\router\index.js:281:22
    at param (E:\github\react-luo\node_modules\express\lib\router\index.js:354:14)

求救!关于如何覆盖ant design的样式

luo哥好,我现在本地服务器跑项目的时候,为什么覆盖不了ant design的样式?
.ant-input-affix-wrapper .ant-input:not(:first-child) {
padding-left: 24px;
} 这是ant design自带的
.login-box .ant-input-affix-wrapper .ant-input {
padding-left: 30px;
} 这是我加的
但是一直覆盖不了上面的样式,总是上面的样式生效

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.