travisyang 最近的时间轴更新
travisyang's repos on GitHub
TypeScript · 2 人关注
monaco-editor-cpp
integrate monaco-editor with clangd language server. support intellisense、lint
TypeScript · 1 人关注
electron-sync-state
without using ipcMain and ipcRenderer, sync two windows(or iframes) data view.
0 人关注
anichart.js
Easily create data visualization animation videos
Java · 0 人关注
bfs-go
0 人关注
biliob-frontend
The frontend part of biliob.
EJS · 0 人关注
blog
TypeScript · 0 人关注
codewars
0 人关注
custom-electron-titlebar
Custom electon title bar inpire on VS Code title bar
TypeScript · 0 人关注
demo
TypeScript · 0 人关注
docx
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
TypeScript · 0 人关注
electron-comm-perf
TypeScript · 0 人关注
electron-react-monaco-webpack-ts-starter
0 人关注
electron-unity
Embed unity app in electron window
JavaScript · 0 人关注
everyday-learning
记录每天学到的东西
TypeScript · 0 人关注
file-tree
TypeScript · 0 人关注
flowchart.js
Draws simple SVG flow chart diagrams from textual representation of the diagram
0 人关注
instapress
Fast and furious WordPress theme to share photos with small description
0 人关注
Jannchie
0 人关注
jps-explained
Code for a "Jump Point Search, Explained" post on zerowidth.com
JavaScript · 0 人关注
learn-30-os
HTML · 0 人关注
learn-css
0 人关注
leetcode
HTML · 0 人关注
lloogg.github.io
Java · 0 人关注
maze
TypeScript · 0 人关注
monaco-languageclient
NPM module to connect Monaco editor with language servers
JavaScript · 0 人关注
mxgraph
mxGraph is a fully client side JavaScript diagramming library
JavaScript · 0 人关注
mxgrapheditor
webpack mxgraph editor
0 人关注
quadgrid
quadtree based grid generator, also can work as solution for rectangle add, retrieve
0 人关注
R3F-Shader
A Wavey image shader with R3F & Shaders
travisyang

travisyang

V2EX 第 351645 号会员,加入于 2018-09-23 15:59:11 +08:00
travisyang 最近回复了
比我这个前端强太多了😢,最近也是迷茫,又想换工作但又不想继续前端,学习其他技能又得重新开始
2023-04-19 10:50:03 +08:00
回复了 travisyang 创建的主题 Electron 使用 useLocalStorage 实现 electron、网页多窗口 state 同步
@snowKing66 效率上还没考虑过。其实用 ipc 的话也可以用同样的方式封装成一个 hook 。我一开始只是觉得 ipc 太麻烦了
2023-03-15 17:13:59 +08:00
回复了 travisyang 创建的主题 Electron 使用 useLocalStorage 实现 electron、网页多窗口 state 同步
@zsj1029 是的
2023-03-15 17:13:37 +08:00
回复了 travisyang 创建的主题 Electron 使用 useLocalStorage 实现 electron、网页多窗口 state 同步
@ruxuan1306 确实少返回了一个 setStore ,不过 mobx 支持直接修改成员变量触发 ui 更新,所以返回一个值也够了
2023-03-08 15:33:52 +08:00
回复了 travisyang 创建的主题 程序员 不使用 ipc 实现 electron 多窗口 ui state 同步更新的一种方法
@lizhenda 其实我觉得最简单的还是主窗口用 BrowserWindow 创建,其他窗口通过主窗口的渲染进程打开,将 mobx store 对象暴露在 window 上,然后修改互相的 window.store 的属性值,就能实现视图同步。但这样的问题在于多个窗口就要有多个 store 对象,而不是一个 store 对象可以被多个窗口监听到。我本来想表达这个主题,刚刚发现这种局限性很大😢
2023-03-08 14:56:21 +08:00
回复了 travisyang 创建的主题 程序员 不使用 ipc 实现 electron 多窗口 ui state 同步更新的一种方法
@lizhenda 好的,我突然发现我这种方式在子窗口的组件中不能用 react hook 了,感觉确实有局限性。
2023-03-08 14:24:09 +08:00
回复了 travisyang 创建的主题 程序员 不使用 ipc 实现 electron 多窗口 ui state 同步更新的一种方法
@zsj1029 虽然是两个独立内存,但是通过 window 对象,两者可以拿到互相的内容。

window 对象支持互相引用,通过 window.open 函数的返回值可以拿到窗口对象的引用,也可以通过 window.opener 得到打开窗口的那个窗口

const childWindow = window.open();

const parentWindow = window.opener;

因此我尝试用同一个 ReactDOM 引用去渲染不同窗口的视图,发现真的可以实现同步。
2021-11-10 15:59:41 +08:00
回复了 movq 创建的主题 程序员 学习编程是看文档还是看视频教程
两者结合不行吗?
好复杂啊,第二点和第三点问题,把 .fullscreenContainer 的 display: flex 去掉试试?
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2521 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
Developed with CodeLauncher
♥ Do have faith in what you're doing.