tom1234
asked on
In mobx-state-tree, what is the difference, 'getSnapshot' and 'toJSON'.
I'm using mobx-state-tree
What I want to know is what the difference is 'getSnapshot' and 'toJSON'.
I think both of them are doing same role that returns json format data.
ex)
between
var jsonData = getSnapshot(chatsStore.use rInfo)
and
var jsonData = chatsStore.userInfo.toJSON ();
What's difference??
What I want to know is what the difference is 'getSnapshot' and 'toJSON'.
I think both of them are doing same role that returns json format data.
ex)
between
var jsonData = getSnapshot(chatsStore.use
and
var jsonData = chatsStore.userInfo.toJSON
What's difference??
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Open in new window
For the rest, the actual value be identical.