Symbol as model key #1939
Labels
enhancement
Possible enhancement
help/PR welcome
Help/Pull request from contributors to fix the issue is welcome
level: intermediate
Feature request
Is your feature request related to a problem? Please describe.
Trying to replace some large nested mobx observable objects with MST model, but unable to do so because MST model ignores Symbol keys when mobx itself supports observable Symbol keys.
Describe the solution you'd like
Symbol as key in a model, by possibly replacing
Object.keys
in https://github.com/mobxjs/mobx-state-tree/blob/master/packages/mobx-state-tree/src/types/complex-types/model.ts withReflect.ownKeys
Describe alternatives you've considered
Replacing all occurrences of symbol with plain strings in my code, but need to make addition string maps because I'm also using Symbol to store a
description
string field in it.Additional context
Are you willing to (attempt) a PR?
The text was updated successfully, but these errors were encountered: