mobx-devtools icon indicating copy to clipboard operation
mobx-devtools copied to clipboard

ObservableMap only show Empty Object on Mobx Devtools

Open fortezhuo opened this issue 6 years ago • 9 comments

Hi,

Thanks for great Chrome Extension.

I used to use this extension to trace mobx store data. Everything seems ok. But I can't trace value of Observable Map

ss

For temp solution, I have to set toJS() function to global window like this : ss2

So can you enhance this great extension to display value of observable Map ?

fortezhuo avatar Mar 24 '18 02:03 fortezhuo

Fixed in 0.9.15

andykog avatar Mar 24 '18 20:03 andykog

Hi Andy,

Thanks for quick response. I have upgraded to 0.9.15. But now this extension had been broken. This extension only show blank and no inspectable information shown up.

ss1

ss2

And here is my information :

  • macOS High Sierra 13.3
  • Opera 51.x upgraded to 52.x (Chrome 65)
  • Mobx 4.0.2
  • Mobx React 5.0.0
  • React 16.2

fortezhuo avatar Mar 25 '18 00:03 fortezhuo

@hedikasmanto, sorry, webpack build failed because of eslint error but the process exited with code 0 due to misconfiguration. Fixed in 0.9.16

andykog avatar Mar 25 '18 16:03 andykog

Thanks Andy. I have upgraded to latest and it almost works perfect. Some issues that I found, if my data have Date or Arrays datatype, those datatypes won't be inspectable and still be Empty Object. Mobx Extension : ss

My Global toJS function ss1

fortezhuo avatar Mar 25 '18 22:03 fortezhuo

@hedikasmanto, dates should now be displayed fine (v0.9.17). Are you sure that those values are actually arrays? For me both native and observable arrays are shown fine: screen shot 2018-03-28 at 21 18 48 Could you try right click on the value → store as global variable and make sure that you have an array there?

andykog avatar Mar 28 '18 18:03 andykog

I have upgraded this extension (0.19.7) And problem still occurs. And FYI, I have store named "flow", and flowStore has observableMap named "data". And In that observableMap "data" contains value date and array

ss

fortezhuo avatar Mar 29 '18 02:03 fortezhuo

Hey guys, I've got the same issue too, all Maps cannot be shown in mobx-devtools, no matter observable or not. image I'm pretty sure this map is not empty. I suppose it's some kind of issue related to mobx versions, I'm now using mobx 4.1.0, and if I remember right, mobx 3.x use Object to implement observable Map, but now in 4.x using native Map().

sxcooler avatar Jun 08 '18 10:06 sxcooler

Hi @sxcooler I had uninstalled this chrome extension. And I forgot to follow up this issue. And you can go with solution from https://github.com/zalmoxisus/mobx-remotedev

For this issue, I will remain open till it solved

fortezhuo avatar Jun 08 '18 12:06 fortezhuo

@hedikasmanto Thanks a lot.

sxcooler avatar Jul 20 '18 02:07 sxcooler