Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

setting className using useEffect

useEffect(() => {
  document.body.className = 'signin';
  return () => { document.body.className = ''; }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #setting #className #useEffect
ADD COMMENT
Topic
Name
3+9 =