Skip to content

What is the proper way to import and use css styles in reactjs with victory? #2645

Closed Answered by rstor1
rstor1 asked this question in Q&A
Discussion options

You must be logged in to vote

I found that victory does not natively support this type of styling. Instead I used a hook like this in a separate file:

export const useVictoryStyles = () => { return useMemo(...styles)}

and imported it and used the style={style from imported useVictoryStyles}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rstor1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant