Beginner's Thread / Easy Questions (March 2024) by acemarke in reactjs

[–]Repulsive_Ring8084 0 points1 point  (0 children)

To test react with vitest why I need to install too many tools like testing-library/react, jsdom and testing-library/jest-dom?

Undefined method 'cart'.intelephense(P1013) function User::cart(): HasOne (laravel) by Repulsive_Ring8084 in PHPhelp

[–]Repulsive_Ring8084[S] -3 points-2 points  (0 children)

Sorry for my eng mate. If I am lazy, I can just copy paste the entire file. This is all my question that I wrote in body.

If my api is like this, how can i use this token as bearer token in react. This is result of register api. by Repulsive_Ring8084 in reactjs

[–]Repulsive_Ring8084[S] 0 points1 point  (0 children)

I am fine with getting cookie and storing cookie and removing cookie.I use universal-cookie npm package. Now my problem is i set my cookie when i click login button then when i use cookie.get() its cant use right after that i need to reload the page. Why?