Logging library #194
Replies: 2 comments 5 replies
-
Wooww this is pretty extensive, @Wendystraite nice work 👏. Amazing to see the new plugin system in action. The simple demos I've put together aren't anywhere near this comprehensive. Sure, I have some notes. First, a couple things going out in the next release, I'm sure you already know given your comment on #190
I'm currently finalizing all API changes for the first release candidate, so this will all be considered stable very soon. But first, I'm planning on changing a few more things:
I see a few things Zedux can improve.
A few things the logger can improve:
The deobfuscation stuff is a candidate for the official The single letters are scary, and I wish there was a way to make autocomplete and debuggers show them last. Switching to them has trimmed more than 5kb off the minified build, so they're pretty hard to argue against. I'm glad I've been diligent about commenting those so you knew what they were 😄 . Some properties are probably unnecessarily obfuscated. I'm planning on revisiting them over time as I actually use Zedux v2 - adding user-friendly getters for properties that end-users do need to know about. That can be done in minor versions. Let me know if you've encountered any you really wish weren't obfuscated. Anyway, brilliant work. If you publish this, I'll add a mention/link to it in the docs 🙌 |
Beta Was this translation helpful? Give feedback.
-
@Wendystraite I'm thinking of making a change to ecosystem events that I don't think will functionally impact the logger, but want to run it by you just in case: Currently ecosystem events are scheduled. This ensures plugins don't receive events during React renders. But it has (minor) problems compared to the alternative approach of passing them to event listeners immediately with no scheduling step:
So rather than change some events to not be scheduled, I'm thinking of changing them all to not be scheduled. I see you have a note about performance issues in the logger readme. I didn't dig into it, but this change could help. Plugin authors will just need to be aware that they can receive events during React renders. Update state in a microtask to be safe. Do you know of any way this change could negatively impact the logger? |
Beta Was this translation helpful? Give feedback.
-
Hello, I am working on a logging library for Zedux : https://github.com/Wendystraite/zedux-logger
It is supposed to work with the latest beta version of Zedux using the new plugin system.
If you have some time to test it I appreciate any feedback.
Notable features :
To test it :
import { addZeduxLogger }
and call it with as first parameter the ecosystem and as second parameter the logger options.Beta Was this translation helpful? Give feedback.
All reactions