score:-1
save the thedata variable not 'thedata' as string value.
localstorage.setitem('thekey', thedata);
score:1
open up the web console and run the command, localstorage.getitem('thekey')
if you still don't see it, try setting the key with window.localstorage.setitem('thekey', 'thedata')
Source: stackoverflow.com
Related Query
- localStorage not properly storing
- LocalStorage not working properly ReactJS
- React: An component attribute is not properly storing the data (from a query) that I want
- LocalStorage not working after storing token
- MUI - Outlined select label is not rendering properly
- In reactjs and nextjs constructor getting Reference Error: localstorage is not defined
- react router relative link does not link properly
- React-Select Async loadOptions is not loading options properly
- Ant-Design CSS not loading properly
- react-native-keyboard-aware-scroll-view not working properly
- useEffect does not listen for localStorage
- React leaflet not rendering properly
- scaleY property not maintained properly for small screens
- Where should I store my JWT in 2019 and is the localStorage really not secure?
- SpyOn a mocked jest module not spying properly
- React App not redirecting properly on AWS Amplify
- ios Could not get BatchedBridge, make sure your bundle is packaged properly
- React Component not rendered properly with Turbolinks in Rails 5.1
- ag-grid-react does not render properly
- fireEvent not properly calling event in react-testing-library
- Why typescript does not properly infer T[K] with <T extends Person, K extends keyof T> generic?
- Keydown/up events with React Hooks not working properly
- react-bootstrap <Button> not working properly
- ReferenceError: localStorage is not defined in ReactJS Build
- React input[type=date] component does not work properly
- Prisma Schema not updating properly after adding new fields
- React Admin: onSuccess does not work properly on <Edit> Component
- React Router Switch did not work properly
- React router goBack() not working properly
- Frontend/Backend separation: Safari not storing cookies from API which is hosted on a separate domain than its Frontend SPA client
More Query from same tag
- Parent State is not being updated when trying to change the parent state from child. (passing a handler as prop from parent to child)
- KeystoneJS can't update post
- Filter is not a function using React UseEffect of a data from MongoDB
- Typing a function identically to another function with Typescript
- How to test Class Component containing axios?
- Griddle v1 onRowClick not firing
- React - Differential Loading (es5, es6, esnext, etc) based on browser
- react-router access history prop in mapDispatchToProps
- react - Have an element return two adjacent <tr> tags
- Typescript Box produces a union type that is too complex to represent
- React Router with optional path parameter
- How to correctly add an if statement inside return statement in react?
- How to use TypeScript declaration files alongside JavaScript
- React-Grid-Layout elements handle jumps if there are other elements in the app root in react app
- Create-React-App unable to find my images folder
- React Font Awsome import font variable names from JSON
- React---TypeError: Cannot read property 'map' of undefined
- React Bootstrap Table is not displaying the data fetched from api response
- how to handle if condition inside another if condition not working has excepted in reactjs
- ReactJS: Which lifecycle method should I use to detect change in props?
- how do i passing nesting object as a props in react
- Given action "X", reducer "Y" returned undefined
- React 16.X getderivedstatefromprops returned new state .Is possible to change that same state inside component again?
- Simple button component not accepting variables
- Mapbox react - Display route with adjustments to nearest road using list of location points
- Using external js library in functional component
- useEffect makes onChange and typing lag/slow
- How I can pass argument to callback function of addEventListener
- CRUD op Express.js Node.js Mysql Cannot insert using MVC
- How can I apply -webkit-autofill using MUI on React?