Open ksjogo opened 6 years ago
Thanks for the report and fix!
Could you do git clone
, git checkout develop
, npm install
and then copy dist/classy-mst.js
into node_modules/classy-mst/dist
inside your project? Then you could test the latest changes and maybe try to fix the missing names.
I made the change you suggested but haven't got the dev tools installed at the moment to figure out the views.
The disappearing names are really confusing... Reactions are reported here:
spyReportStart({
name: this.name,
type: "reaction"
})
The devtools listen to the event here:
case 'reaction':
// object, fn
change.objectName = observableName(mobx, change.object);
break;
Where does change.object
come from? I can't see anything that would set it.
Similarly computed values are reported here:
spyReport({
object: this.scope,
type: "compute",
name: this.name
})
Devtools expect the changes
object to have a target
property here:
case 'compute':
// object, target, fn
change.objectName = observableName(mobx, change.object);
change.targetName = getNameForThis(mobx, change.target);
break;
Works fine. I need to finish my thesis atm, will try to find the culprit from next week on.
Currently everything is unnamed inside the mox dev tools. A patch like (sorry, npm forking is still annoyingly complicated in conjunction with typescript and just patching over the lib a lot easier to setup)
Will show names for actions at least:
There still are a lot of undefined things though. I tried also naming the views and getters but it didn't result in any noticeable change. Do you maybe have some idea, where these async reactions etc. could be named/lose their name.