We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbols offer nice features such as ensuring that enums values are actually distinct across different enums.
It would be nice to be able to supply symbols as modifiers so that multiple modifiers of different enums were supported.
Take this example.
const MyEnum = { A: 'A', B: 'B', C: 'C', }; const YourEnum = { A: 'A', B: 'B', C: 'C', }; const styles = reactCSS({ default: { root: { width: 10, } }, [MyEnum.A]: { root: { width: 20, } }, [YourEnum.A]: { root: { height: 10, } } }, { [MyEnum.A]: x === MyEnum.A, [YourEnum.A]: y === YourEnum.A, });
This would cause a conflict in keys. To solve this problem enums are often written using symbols.
const MyEnum = { A: Symbol('A'), B: Symbol('B'), C: Symbol('C'), }; const YourEnum = { A: Symbol('A'), B: Symbol('B'), C: Symbol('C'), };
The current for own, and to string of key-value doesn't permit symbols to be used.
key-value
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Symbols offer nice features such as ensuring that enums values are actually distinct across different enums.
It would be nice to be able to supply symbols as modifiers so that multiple modifiers of different enums were supported.
Take this example.
This would cause a conflict in keys. To solve this problem enums are often written using symbols.
The current for own, and to string of
key-value
doesn't permit symbols to be used.The text was updated successfully, but these errors were encountered: