A Few-Years-Old G6 + React Bridge That Just Survived a React 18 Migration
A developer successfully migrated a G6 + React hybrid renderer from React 17 to React 18. The core structure of the bridge remained intact, although some adjustments were necessary. The project aimed to keep G6's complexity hidden from the business logic, allowing developers to use standard React components.
- ▪The G6 + React hybrid renderer was built for an internal business tool a few years ago.
- ▪The migration to React 18 required some changes, but the main structure of the bridge survived.
- ▪The project was designed to allow developers to write standard React components without needing to interact with G6's documentation.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1209343) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } wangzhi Posted on May 26 A Few-Years-Old G6 + React Bridge That Just Survived a React 18 Migration #react #javascript #webdev #architecture A few years ago, I built a G6 + React hybrid renderer in an internal business tool. It was the React 17 era. Last week the project upgraded to React 18, and the core structure of the bridge survived — but a handful of specific things had to change. This isn't a "look at my performance hack" post. The graph holds maybe 15 nodes at most.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).