Skip to content
New issue

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

t.raw is not a function #52

Closed
mismosmi opened this issue Aug 16, 2021 · 5 comments
Closed

t.raw is not a function #52

mismosmi opened this issue Aug 16, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@mismosmi
Copy link
Contributor

Describe the bug
Hi,
first off I'm really sorry if I waste your time on this, it is probably just my confusion.
I use next-intl@1.3.3 and try to use t.raw to access an array of strings from my translation to render a list of product features but t.raw seems to be undefined.

To Reproduce
I reproduced this using use-intl instead of next-intl as mocking next/router in codesandbox sucks.
https://codesandbox.io/s/hidden-pine-rsmnl?file=/src/App.js

Steps to reproduce the behavior:

  1. See error

Expected behavior
I'd expect t.raw to be there and return the raw array so I can render my list from the input strings.

@mismosmi mismosmi added the bug Something isn't working label Aug 16, 2021
@mismosmi
Copy link
Contributor Author

Sorry, this does not actually reproduce the issue I'm seeing,

@mismosmi
Copy link
Contributor Author

This does actually reproduce the issue:
https://codesandbox.io/s/next-intl-template-forked-mxw1y?file=/src/pages/index.js
again, sorry!

@mismosmi
Copy link
Contributor Author

It doesn't, something's wrong with my setup.

@mismosmi
Copy link
Contributor Author

There is some kind of state where this issue appears however, I did see the error message in codesandbox but after a refresh it was gone. I ended up running npm install and then npm run dev again in my project and now the function's there as well.
Whatever.

@amannn
Copy link
Owner

amannn commented Aug 16, 2021

The function was only introduced recently in v1.5.1 (#51). The version you mentioned above didn't contain the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants