从零搭建React全家桶框架教程

#23

为啥哩??我一直在用axois~

#24

unfetch 特点,体积小,兼容 fetch, 和开发 Preact 的是同一作者。

#25

ie8 好多东西要降级~简直煎熬。缓段时间,搞的吐血了。

#26

是啊,版本的问题就有的搞啦,哈哈

#27

ie8搞好了,明天么后天我上传到github去。嘿嘿嘿嘿。。。。

#28

厉害了:+1::+1:太厉害

#29

已上传 https://github.com/brickspert/blog/issues/5

#30

周日上不上社区啊,有个问题还得请教下。我生产环境构建,dist文件下没东西!!控制台输出是编译成功的,不报错。
但是这句输出的"webpack output is served from / "
from后面是空的,是不是有问题?

#31

npm run build(应该不是吧?)命令吗?那应该dist里面有东西的。肯定你配置文件写错啦。后面一个问题我也不太清楚,需要开了电脑看。

#32

额,找到问题啦,我蒙圈了,还是用的webpack-dev-server 启动的生产环境配置文件,我说么画风不对,控制台打印的命令确实是启动了生产环境的配置文件,居然还能自动刷新???回去npm脚本里一看,复制粘贴的时候忘记改成webpack了。。。(捂脸。。),现在只有两个问题,
1是拆分路由以后页面报错,down了你的源码也会报错。这块儿有问题吗?
2是异步请求那块,localhost:8080/api/data.json报跨域错误,改成127.0.0.1:8080/api/data.json就行了,懵逼中。。。

#33

第一个问题,你可以把错误信息贴出来。源码应该没问题的。 第二个错误不应该发生呀。。我也懵逼。

#34

时光飞逝,楼主,距发帖已经一年半了,我才开始学习,你们react学的怎么样了,感谢楼主的教程:imp:

#35

楼主,还在吗?

#37

楼主可能已晋升技术总监,都不写代码了:rofl:

#38

没有晋升,还在苦逼的写代码。哈哈。

推荐下正在写的 hooks 库:https://github.com/umijs/hooks

#39

楼主进阿里了,不错

#40

初学者,安装完RN环境,用react-native run-ios会异常,直接用xcode运行代码,可以运行。
异常如下:
info Found Xcode workspace " h2.xcworkspace "

info Building (using “xcodebuild -workspace h2.xcworkspace -configuration Debug -scheme h2 -destination id=D7544376-96A7-4644-A524-4A1AD0441715 -derivedDataPath build/h2”)

info Installing " DerivedData/Build/Products/Debug-iphonesimulator/h2.app "

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):

Failed to install the requested application

An application bundle was not found at the provided path.

Provide a valid path to the desired application bundle.

Print: Entry, “:CFBundleIdentifier”, Does Not Exist

error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/h2.app/Info.plist

Print: Entry, “:CFBundleIdentifier”, Does Not Exist

. Run CLI with --verbose flag for more details.

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/h2.app/Info.plist

Print: Entry, “:CFBundleIdentifier”, Does Not Exist

at checkExecSyncError (child_process.js:629:11)

at Object.execFileSync (child_process.js:647:13)

at runOnSimulator (/Users/lucunlu/Documents/Fight/ReactNative/h2/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:174:45)

at process._tickCallback (internal/process/next_tick.js:68:7)

其中:
react-native-cli: 2.0.1
react-native: 0.61.1
xcode:11