question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected behavior

Using onload={} to get a reference to an element in order to modify it with a non-choo library will allow that library to modify the element without overwriting changes in the second pass.

Actual behavior

The DOM is rewritten later.

Steps to reproduce behavior

Full code to an example: https://gist.github.com/tmcw/0b443b065c10b636cf073cbf64e67110

This is a pattern that’s familiar to me with React: I’m integrating with Mapbox GL JS, a library that expects to control a small part of the DOM tree - the same will hold for Leaflet, Mapbox.js, and all other mapping libraries I know of. In React, we use refs to do this. In choo, I assumed that onload={} would be the ticket, but I can’t find any way to get choo to play nice with a library that does its own DOM manipulation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yoshuawuytscommented, Oct 14, 2016

@tmcw released cache-element@1.1.0 - the widget function should be what you’re looking for to integrate mapbox with yo-yo/choo https://github.com/yoshuawuyts/cache-element ✨ keen to hear your thoughts on it!

0reactions
yoshuawuytscommented, Oct 23, 2016

This should be solved; gonna close this ✨ - lmk if you’ve got any further questions, always happy to help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReFS
Resilient File System (ReFS), codenamed "Protogon", is a Microsoft proprietary file system introduced with Windows Server 2012 with the intent of becoming ...
Read more >
Resilient File System (ReFS) overview
The Resilient File System (ReFS) is Microsoft's newest file system, designed to maximize data availability, scale efficiently to large data ...
Read more >
Refs and the DOM
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >
ReFS Overview
Abbreviation for Resilient File System, ReFS is a file system created with source codes of the latest versions of NTFS. ReFS is not...
Read more >
What is Resilient File System (ReFS)? | Definition from ...
Resilient File System (ReFS) is a file system developed by Microsoft for use on the Windows operating system (OS) that's designed to overcome...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found