Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
How to make react app save the selected language when i m choosing languages

I want the input to store the selected languages ​​so I can change the language in the selector. I want the language change to be reflected in the entire application,enter image description here

<SelectsLanguages
                            languages={languages}
                            
                            onChange={languages => setState(prev => ({...prev, user__languages : languages}))}
                            value={state.user__languages}
                            name="user__languages"
                            
                        />
 const [state, setState] = useState(
        { user__languages: urlParams.get('user__languages') || ""
 
 
    }
    );
 
 const onSubmit = () => {
 
 const params =
  `&${state.user__languages.length ? state.user__languages : '' }`;
     })
        }

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could use Cookies for that There is the Module universal-cookie for react

import Cookies from 'universal-cookie';
const cookies = new Cookies();
cookies.set('language', state.user__languages', { path: '/' }); //set cookie
console.log(cookies.get('language')); //read cookie
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!