brahmosjs / brahmos

Super charged JavaScript library with modern React API and native templates.
https://codesandbox.io/embed/brahmos-demo-3t8r6
MIT License
573 stars 25 forks source link

Support React DevTools in brahmos #65

Open itaditya opened 4 years ago

itaditya commented 4 years ago

Opening this issue to kick start discussion about how React Devtools can be made to work with Brahmos.

@s-yadav have you looked into it before?

ameerthehacker commented 4 years ago

Design Plan

I have the following understanding on adding react devtools support after looking into the preact code base. Reference files from preact are

https://github.com/preactjs/preact/pull/1549/files

All the devtools related code is under src/debug. A very basic implementation has now allowed us to the detection of Brahmos by the React devtool

Screenshot 2019-11-10 at 6 59 54 PM
s-yadav commented 4 years ago

Few points,

  1. Forming component tree.
  2. Displaying state, props, context.
  3. Hooks
  4. Profiler
  5. Linking actual dom to the component hierarchy
  6. Rerender component on state changes through dev tool

We will see if we need Profile before 5, 6. We can move it to last as well.