3 ms·
Ask HN: Has anyone built a reactjs state editor yet?
I'm looking for a reactjs plugin/mixin I can use to modify the state of any component at run-time.
I've built something like this before for arbitrary JavaScript objects (https://github.com/Azeirah/Object.remote), and I will port it to React if it doesn't exist yet, just wondering if it's already out there.
- therealmarv 11y agoever looked at https://github.com/gaearon/react-hot-loader https://github.com/gaearon/react-hot-loader ?
- azeirah 11y agoThat's close, but not it unfortunately. I'm looking specifically for a UI that allows me to modify the state of every and any component at run-time, I have no need to replace any code.
- therealmarv 11y agoHmm, I'm not sure if your approach is even possible. In React a component itself holds the state internally only (this is also why it is so cool also) and the render function outputs everything to the browser. But once it is rendered there is no way back into the component. It's one way in React. You want to change deep internally react components and the react hotloader mentioned is the closest you can get. But I hope you will find a solution. And BTW: The React Hotloader also preserves state... so you can code and state will change.
- kentor 11y agoReact dev tools? https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en https://chrome.google.com/webstore/detail/react-developer-to...