Debugging
For debugging we recommend @reatom/logger
package (included in @reatom/framework
)
Installation
#After install finished you need to connect logger to reatom context
More settings you can found in @reatom/logger documentation
Usage
#Immutable nature of Reatom give us incredible possibilities for debugging any data flow kind: synchronous and asynchronous.
Let’s start from simple example.
This is what we see in logs:
Records comes in pairs: atom and new state value. Under atom name record you can found few properties:
- cause - describe why this update happens, why trigger it
- history - atom values that was before update
More complex example you can find in @reatom/logger package documentation