attaching css class to element with ref in reactjs code example Example: cre&atRefs react js const node = this.myRef.current;