Developer tooling / browser extensions #53043
Replies: 2 comments 6 replies
-
This is a great conversation to have. Preact DevTools definitely work and we've used them when debugging the runtime. They need an import of @michalczaplinski was also experimenting with Redux DevTools for the store: I'm confident we can even make it work with immutable snapshots using a similar algorithm to the one in Valtio, but that code also needs to be injected by the runtime. I guess the question is: what would be the best way to opt into this development mode and inject this code? WordPress doesn't have such mode, does it? cc: @gziolo |
Beta Was this translation helpful? Give feedback.
-
If I'm not mistaken, |
Beta Was this translation helpful? Give feedback.
-
Preact already has browser extensions to help developers get a look at the rendered components and Alpine.js also has a browser extension to see the current state of components.
For development and debugging workflows it would be way easier to have some way to look at the current state of a component in the browsers developer tools (instead of having to add
console.log
ordebugger
statements).I guess that the preact dev tools will work (since under the hood the interactivity API uses preact).
How can we get access to the current state in developer tools? Will it work out of the box since preact signals are used? Do we need to develop custom extensions?
I guess it's kinda related to #53036 in a more general way: React, preact and Alpine.js already have a large community and therefore many tools for developers. To get WordPress developers on board, I think we need to provide some tools which make writing and debugging/testing this code easy/easier as well.
Beta Was this translation helpful? Give feedback.
All reactions