Uncaught TypeError: Lang.get is not a function in Reactjs-Laravel
abdorrahmani opened this issue · 2 comments
abdorrahmani commented
I did all the mentioned steps, but it gives me an error
in React: I am import Lang from "lang.js";
and <p>{Lang.get('messages.home')}</p>
and error: Uncaught TypeError: Lang.get is not a function
Can anyone guide me?
Thanks
MohammadAbdorrahmani commented
please help @rmariuzzo
rmariuzzo commented
@MohammadAbdorrahmani before using an instance method, you have to create an instance from Lang
see this example: https://github.com/rmariuzzo/Lang.js/#get