Comments (5)
Hi, I’ve copied a part of your code with a nested object, and the issue isn’t reproducible for me.
![Screenshot 2023-11-08 at 18 08 06](https://private-user-images.githubusercontent.com/22447849/281376585-35eb2c11-5828-4c8d-bb1b-f166765d6f11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MzUyODQsIm5iZiI6MTcyMzgzNDk4NCwicGF0aCI6Ii8yMjQ0Nzg0OS8yODEzNzY1ODUtMzVlYjJjMTEtNTgyOC00YzhkLWJiMWItZjE2Njc2NWQ2ZjExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDE5MDMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyMDc4NWVjNjEwYTg4NDg0NjA0MzM4ZDU5YmJlYzczMGY0ZjI2Zjk3MWQzMDRlZDIwNjZmNTg3MWUzZTA4MGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.b1RLFqUEeE2MqQhi3lUggfOMc6zZ9ZnpSw_7JRypOlE)
Code:
![Screenshot 2023-11-08 at 18 10 56](https://private-user-images.githubusercontent.com/22447849/281377128-d980c402-5ce3-41af-8e96-b91407c250f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MzUyODQsIm5iZiI6MTcyMzgzNDk4NCwicGF0aCI6Ii8yMjQ0Nzg0OS8yODEzNzcxMjgtZDk4MGM0MDItNWNlMy00MWFmLThlOTYtYjkxNDA3YzI1MGYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDE5MDMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2YmZjMDBkZTM1MDBkNDdhY2QwOTRmNWUwYTFkNmFjODdiZmZlZDY0MTA0MmUyZTk1Y2ZlMTMyODhiMjgwNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qU7BYoZcg2OD65qptca9DSYd_MFcdY_AxBESr0zVVJQ)
May I ask for a simple GitHub reproduction as well as screenshots from the devtools? To avoid setting up everything from scratch, you can fork the repo, go to the example
folder and modify the demo project. Use npm i && npm run start
to set it up: https://github.com/kubk/mobx-log/tree/master/example
I use this subproject to test the library
from mobx-log.
Thanks for investigating. I forked the repo, modified stopwatch-store.ts, and was able to repro, although the behavior seems slightly different.
Commit in my fork: vaughnkoch@e13d240
I labeled the scenarios A through D below. I also attached a zipfile with the screenshots.
mobx-log screenshots - Issue 43.zip
const data = {
// A: Does not work.
// todos are populated at StopwatchStore@nextStep,
// expected at setTodos or fetchData.
'abc': { id: 'abc', firstName: 'First', lastName: 'Last' },
// B: Does not work.
// todos are populated at StopwatchStore@start,
// expected at setTodos or fetchData.
// 'def': { id: 'def' },
// C: Works.
// todos are populated at StopwatchStore@fetchData,
// although not at setTodos.
// 'def': 'xyz',
// D: Works.
// todos are populated at StopwatchStore@setTodos.
// Blank object
}
from mobx-log.
@vaughnkoch Thanks. Try installing an experimental fix npm i mobx-log@beta
. If NPM can't locate that version - clear the cache first via npm cache clean --force
from mobx-log.
Hi @kubk, I tried mobx-log@beta ([email protected]), and it appears to fix the problem, thanks! When do you think this new fix will be available in non-beta? Also, I'd be curious to know what the fix was.
from mobx-log.
@vaughnkoch 2.2.3 is ready. Thanks for reporting the issue.
I had to use setTimeout to delay the creation of the store snapshot. The previous implementation only utilized spyReportStart/spyReportEnd, and it seems like it wasn’t enough: https://mobx.js.org/analyzing-reactivity.html#:~:text=report%2Dend-,spyReportEnd,-%3Dtrue%2C%20time%3F%20(total
from mobx-log.
Related Issues (20)
- Colorful diff
- Test action destructurize
- Feature Request: Log filter HOT 5
- Allow to install Mobx formatters without registering spy
- configureMakeLoggable readme update HOT 1
- Move away from TSDX
- Feature request - local filters vs global filters (conditionally show actions, observables, computeds) HOT 2
- Feature request - filter at a granular level HOT 2
- Set up a pre-commit hook to format code with Prettier
- Get rid of CaughtException in logs
- Provide a config option to hide React event objects
- The package should be framework-agnostic and don't require React
- Feature request - Integration with redux-remotedev HOT 2
- Get error "using mobx-log without an initializer function is deprecated" HOT 2
- Feature request - show computeds in the browser HOT 2
- MST support HOT 2
- Incorrect field name parsing HOT 1
- [Discussion] Should be there two different functions: makeLoggable and makeAutoLoggable? HOT 2
- Set making first letter in store name to lowercase optional HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobx-log.