Skip to content
Advertisement

Tag: reactjs

How to search for string in any order

I have a .js file with an array of strings inside. Let’s say one of my arrays has the string “The quick brown fox jumps over the lazy dog”. I can search “The quick brown fox” and it will display the string in my array which has that value. But if I were to search “The quick fox jumps lazy

React router v6: Protected Routes displaying after logging out

I am attempting to implement a private route in React; the homepage should not be visible until the user logs in. If I restart my frontend, all protected routes are not accessible until the user logs in. However, after the first login, all protected routes don’t seem to be protected; I can logout, the session is destroyed in my database

Advertisement