We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
λ‘컬 μ€ν 리μ§μ μ μ₯νκ³ ν λ§ μ¬λΆμ λ°λΌ λ€ν¬λͺ¨λ λλ λΌμ΄νΈλͺ¨λλ‘ μ€μ ν΄μ£Όμλ€.
<Helmet> <html data-theme={mobx μνκ΄λ¦¬μμ μ μ₯ν ν λ§μ κ°μ λΆλ¬μ΄} />; </Helmet>
JSX μμμλ μ΄λΌλ react-helmet λΌμ΄λΈλ¬λ¦¬λ₯Ό μ¬μ©νμ¬ λ€ν¬λͺ¨λ ν λ§μ μ€μ λ μνκ°μ λΆλ¬μ¨λ€.
4κ°μ§ λ©μλκ° μλ€ (setItem, getItem, clear, remove)
(setItem, getItem, clear, remove)
JSON.stringity
string
κ·Έλ¦¬κ³ μ‘°νλ₯Ό ν λλ κ°μ²΄νμΌλ‘ λΆλ¬ μμΌνκΈ° λλ¬Έμ stringν λ νμ μ λ€μ JSON.parseλ‘ objectμμΌλ‘ λ³ννμ¬ μ‘°ν(get)νλ€.
JSON.parse
object
// JSON μΌλ‘ λ‘컬 μ€ν λ¦¬μ§ λ°μ΄ν° μμ± localStorage.setItem('key', JSON.stringity({ a: value })); // JSONμΌλ‘ μ€ν λ¦¬μ§ λ°μ΄ν° μ‘°ν JSON.parse(localStorage.getItem('key')); // keyμ ν΄λΉνλ μ€ν 리μ§λ§ μμ localStorage.remove('key') // λͺ¨λ μ€ν λ¦¬μ§ μμ localStorage.clear('key')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
π λ€ν¬λͺ¨λ ꡬνμ μμμΌ ν μ§μλ€
λ‘컬 μ€ν 리μ§μ μ μ₯νκ³ ν λ§ μ¬λΆμ λ°λΌ λ€ν¬λͺ¨λ λλ λΌμ΄νΈλͺ¨λλ‘ μ€μ ν΄μ£Όμλ€.
JSX μμμλ μ΄λΌλ react-helmet λΌμ΄λΈλ¬λ¦¬λ₯Ό μ¬μ©νμ¬ λ€ν¬λͺ¨λ ν λ§μ μ€μ λ μνκ°μ λΆλ¬μ¨λ€.
π€ react-helmet νΉμ§
π localStorage
4κ°μ§ λ©μλκ° μλ€
(setItem, getItem, clear, remove)
λΈλΌμ°μ κ° λ«νλ κ·Έλλ‘ μ μ§κ° λλ€.
μΈμ μ€ν 리μ§μ μ°¨μ΄μ μ κ°λ°μκ° removeλ clearλ₯Ό νκΈ° μ κΉμ§ μμ κ° λμ§ μλλ€.
setItemμ νλΌλ―Έν° 맀κ°λ³μ νμ μ stringμ΄κΈ° λλ¬Έμ μ€λΈμ νΈλ‘ λμ΄μλ λ°μ΄ν° κ°μ
JSON.stringity
λ₯Ό μ¬μ©νμ¬string
νμ μΌλ‘ λ³νμμΌμ£Όμ΄μΌ νλ€.κ·Έλ¦¬κ³ μ‘°νλ₯Ό ν λλ κ°μ²΄νμΌλ‘ λΆλ¬ μμΌνκΈ° λλ¬Έμ
string
ν λ νμ μ λ€μJSON.parse
λ‘object
μμΌλ‘ λ³ννμ¬ μ‘°ν(get)νλ€.β¨ λ‘컬μ€ν λ¦¬μ§ λ©μλ μ’ λ₯
The text was updated successfully, but these errors were encountered: