Skip to content

@tuiPure stringify & i18n translation #5969

Answered by waterplea
mazero asked this question in Q&A
Discussion options

You must be logged in to vote

@tuiPure memoizes result if input hasn't changed. Looks like your countries array remains the same. You need to pass your translations into your stringify method as a second argument so that when new translations arrive — it would recalculate the result.

Another option is to not mutate countries, this way it would become a new ref to the new array and stringify method will be retriggered.

Replies: 1 comment

Comment options

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