You simply cannot have secret variables on the frontend. The frontend is public and accessible on the client side. If you absolutely need to have your frontend make an API call using a secret, you'd better make your own backend that makes the API call for you and gives back the response.
Discovered MSW when going through the React Testing Library docs site -haven't applied it to the codebase at work because we're using websockets to communicate with the server but looking in to it some more
Postman UI is horrendous. Very confusing. I started using Mockoon which I like far better, but I'd like to try this where everything is in code and I can use version control and easily push my mock to other developers. Thanks for this useful tutorial
Please keep your browser updated when it does prompt you to do so. Your session will reload and all your tabs will be restored. Not doing that is akin browsing the web with IE5.
Great video, exactly what I was looking for!
Please make a video on "how to properly handle secret environment vairables in frontend?"
You simply cannot have secret variables on the frontend. The frontend is public and accessible on the client side.
If you absolutely need to have your frontend make an API call using a secret, you'd better make your own backend that makes the API call for you and gives back the response.
Discovered MSW when going through the React Testing Library docs site -haven't applied it to the codebase at work because we're using websockets to communicate with the server but looking in to it some more
Postman UI is horrendous. Very confusing. I started using Mockoon which I like far better, but I'd like to try this where everything is in code and I can use version control and easily push my mock to other developers. Thanks for this useful tutorial
What version of NextJS is this on? I read more recent versions make using MSW impossible :(
Great video as always
Please keep your browser updated when it does prompt you to do so. Your session will reload and all your tabs will be restored. Not doing that is akin browsing the web with IE5.
Nice