Skip to content

Instantly share code, notes, and snippets.

View sturm3nta's full-sized avatar
🔥
making things happen

sturm3nta

🔥
making things happen
View GitHub Profile
@jamesreggio
jamesreggio / react-forwardref-simple-example.js
Last active February 6, 2025 02:06
Simple example usage of React.forwardRef()
// EmailInput wraps an HTML `input` and adds some app-specific styling.
const EmailInput = React.forwardRef((props, ref) => (
<input ref={ref} {...props} type="email" className="AppEmailInput" />
));
class App extends Component {
emailRef = React.createRef();
render() {
return (
@gokulkrishh
gokulkrishh / media-query.css
Last active April 18, 2025 14:56
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */