In GraphQL you can write something like this to define a query:
const USER_QUERY = gql`
{
user(id: 2) {
name
}
}
`
In styled components you can define a styled component like this:
const Button = styled.button`
background-color: papayawhip;
`
What is this syntax? I know with template literals you can sub in variables with this syntax: ${foo}
but I have never seen this used. Any guidance would be appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…