samdenty / console-feed

Captures console.log's into a React Component 🔥
https://stackblitz.com/~/github.com/samdenty/console-feed
MIT License
670 stars 109 forks source link

console-feed not working with user generated logs for online code editor #64

Closed ChristopherHButler closed 4 years ago

ChristopherHButler commented 4 years ago

I am using console-feed with an online code editor like code sandbox but I am having trouble with console logs generated by the user (I am not using it with code sandbox but an editor I am writing myself).

Update:

I was able to get this working but I had to use a different pattern than the basic usage suggested on your readme. The pattern on the readme worked for console logs if they had been saved with the code base and loaded when the component with the console-feed was mounted, but not dynamic console logs the user wrote. I used an unhook, rehook pattern for every update the user made to their code to capture each new console log. This can be closed and sorry for the trouble.