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

travisyang

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

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

const childWindow = window.open();

const parentWindow = window.opener;

因此我尝试用同一个 ReactDOM 引用去渲染不同窗口的视图,发现真的可以实现同步。
Nov 10, 2021
Replied to a topic by movq 程序员 学习编程是看文档还是看视频教程
两者结合不行吗?
好复杂啊,第二点和第三点问题,把 .fullscreenContainer 的 display: flex 去掉试试?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2924 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms · UTC 06:19 · PVG 14:19 · LAX 23:19 · JFK 02:19
♥ Do have faith in what you're doing.