im-js / im.js Goto Github PK
View Code? Open in Web Editor NEW一个基于 react-native + mobx + socket.io + node 的仿微信 JS-Wechat
License: MIT License
一个基于 react-native + mobx + socket.io + node 的仿微信 JS-Wechat
License: MIT License
想知道怎么样实现聊天室
聊天界面的输入框键盘上完成按钮是怎么去掉的啊,我在ios上跑的,我也想把输入框放在键盘顶部,但是键盘上有个完成按钮,而且键盘收起时底输入框不会回到最底下。
报这样的错误?怎么解决,貌似是 socket.io 那里的问题。
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1762): UnableToRe
solveError: Unable to resolve module `G:\React-Native\im.js-master\node_modules\engine.io-client\lib\transports\index.j\lib\xmlhttprequest.js` from `G:\React-Native\im.js-master\node_modules\engine.io-client\l
Bundling `index.android.js`
点击发送的时候 如何输入框不失去焦点且键盘不消失
_login = async () => {
try {
await profileStore.login(
this.state.name,
this.state.phone
);
// toast
} catch (e) {
// toast
}
}
从1-15发送15个数字,再次进入下拉刷新顺序改变
我现在有一个问题你那个手机端的currentkey是${payload.toAccount}-${payload.FromAccount}`;这样让聊天的列表和和聊天窗口对应的。现在我如果加上群聊的话,我不知道改如何这样对应关系了,求教!,群聊和单聊都通用
async modifyUserInfo(field: string, value: string) { // 这里的参数类型检测用的什么工具了
let url = config.server + `/v1/user/${this.userInfo.userId}/property/${field}`;
let result = await fetchLocal(url, {
method: 'PUT',
body: JSON.stringify({
value
})
});
麻烦问一下 , 上面参数给定类型检测是那个工具里面带的. 觉得挺好的但是找不到哪里能控制
其中一个思路是参照 invertible-scroll-view,实现一个反向的 ScrollView 滚动。
这个方案,需要解决消息数未撑满一屏时,消息的起始位置问题。
欢迎提出你的意见。
在哪可以运行您服务器的代码
socket.io 能不能实现推送 通知提醒 ?
我使用socket.io-client(非websocket) 连接server(使用Tcp工具模拟server),server端可以看到连接http的包头信息,socket.io一直在reconnecting,无法触发connect函数;
有没有办法在APP开启一个socketServer?
假如websocket 中的服务其地址是可配置的,那下面这个应该怎么写
const chatSocketStore = new ChatSocketStore();
const profileStore = new ProfileStore(chatSocketStore);
export {
chatSocketStore,
profileStore
};
就是ChatSocketStore中地址可以随时改变,改变后我需要吧ChatSocketStore重新new一下,可以给一点思路吗 @plusmancn
DeviceInfo native module is not installed correctly
class TodoStore {
@observable list = []
@observable fetched = false
@action emit = (url) => {
this.fetched = true
socket.emit(url)
}
@computed get on(){
socket.on('get list',(json)=>{
this.fetched = false
this.list = json.map((index,i)=>{
return new List(index)
})
})
}
}
mobx正常模式没问题,严格模式下
[mobx] Invariant failed: Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: [email protected]
mobx一直给我报错,我把接收socket.on函数放在外面,接收函数就根本不会触发。想知道你是如何处理好客户端的socket的发送与接收的。。。。
socket的接收是不是应该放在组件里面作为一个时刻可以接收信息的可以被任意随时触发的XXX?
/Users/mao/Desktop/im.js/node_modules/react-native/React/Base/RCTPlatform.m:22:10: note: previous case defined here
case UIUserInterfaceIdiomPad:
^
2 errors generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/mao/Desktop/im.js/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTPlatform.o Base/RCTPlatform.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/ImClient.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
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ImClient.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
为什么会报这个错误呢
访问http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false报如下错误是什么原因?
{
from: "F:\www\RN\im.js\node_modules\engine.io-client\lib\transports\index.js",
to: "F:\www\RN\im.js\node_modules\engine.io-client\lib\transports\index.j\lib\xmlhttprequest.js",
message: "Unable to resolve module F:\www\RN\im.js\node_modules\engine.io-client\lib\transports\index.j\lib\xmlhttprequest.js
from F:\www\RN\im.js\node_modules\engine.io-client\lib\transports\index.js
: Directory F:\www\RN\im.js\node_modules\engine.io-client\lib\transports\index.j\lib\xmlhttprequest.js doesn't exist",
name: "UnableToResolveError",
type: "UnableToResolveError",
errors: [
{ }
]
}
去年在网上没看到,后来自己也是用react-native socket.io redux 来弄的。也是实现了基本好友这些功能,及聊天。真是看到的太晚了撒。 建议把名字改成react-native-im***这样, 起码我当初就没找到这个
你好,扫描后无法下载apk进行体验。
你好,我看到计划中有提到这两个功能,是已经实现了吗?
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.