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
Hi,
I am using bem-cn 3.0.1. I need to get class names as strings, but when I am trying to follow this instruction:
Use final call without arguments to get a string
<CustomComponent className={b('icon')()} />
It complains that b('icon') is not a function. Example code:
b('icon')
import { block } from 'bem-cn'; const b = block('button'); console.info(typeof b('icon'), b('icon')); console.info(typeof b('icon')(), b('icon')());
Console result:
object {mix: ƒ, split: ƒ, is: ƒ, has: ƒ, state: ƒ, …} Uncaught TypeError: b(...) is not a function
The object contains toString, so b('icon').toString() works, but to simplify syntax, I was hoping to be able to run the final call from the docs.
b('icon').toString()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I am using bem-cn 3.0.1. I need to get class names as strings, but when I am trying to follow this instruction:
Use final call without arguments to get a string
It complains that
b('icon')
is not a function. Example code:Console result:
The object contains toString, so
b('icon').toString()
works, but to simplify syntax, I was hoping to be able to run the final call from the docs.The text was updated successfully, but these errors were encountered: