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.

Remove container default

See original GitHub issue

Just an opinion based on my personal learning experience with this library.

I’d like to suggest removing the default value for container in the patch function.

I found it quite surprising that there was any default at all - but since the default is document.body, your first experience, if you’re following the example, will be that of your own document getting wiped out, which was pretty surprising to me.

Also, when looking at the example in the README for the first time, my first thought was, “if both of the arguments are virtual DOM nodes, how does it figure out which real DOM element to updated?”

Of course, you learn these things quickly if you start poking through the source-code, but most people will likely jump in without reading documentation, or copy/pasting the example - making this argument non-optional might remove any confusion about how a target element is established and/or what happened to your existing body-content.

Defaults don’t always curb the learning curve - sometimes they increase it.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jorgebucarancommented, Nov 7, 2017

No, I like your changes and just merged them. #41

1reaction
mindplay-dkcommented, Nov 7, 2017

Let’s leave the PR open then, I’ll do both of these before the merge, yeah?

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker rm - Docker Documentation
This removes the underlying link between /webapp and the /redis containers on the default bridge network, removing all network communication between the two ......
Read more >
How To Remove Docker Images, Containers, and Volumes
Remove one or more specific containers​​ Use the docker ps command with the -a flag to locate the name or ID of the...
Read more >
Remove a site from its default Firefox container - Super User
There is a way to do this without dropping the container. You must go to the Multi-account container button in the top bar,...
Read more >
Ubuntu Manpage: docker-rm - Remove one or more containers
Removing a container and all associated volumes​​ $ docker rm -v redis redis This command will remove the container and any volumes associated...
Read more >
With `docker run`, can I remove the container by default?
Is there a way to remove a docker container after it's running by default, if not detached? If this is a bad idea,...
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