What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-24 19:45:02
text color in react js
import React from 'react'; export const UserContext = React.createContext(); export default function App() { return ( <UserContext.Provider value="Reed"> <User /> </UserContext.Provider> ) } function User()... Add solution -
Javascript 2021-09-24 15:36:02
react keep screen on
// Download the nosleep.js bundle // npm install nosleep.js // Import and declare NoSleep // REACT CODE STARTS HERE import React from 'react'; import NoSleep from 'nosleep.js'; var noSleep = new NoSleep(); const WakeButton = () => { return( <div&... Add solution -
Javascript 2021-09-24 12:05:03
react scrolling a div by dragging the mouse?
import React from 'react';import classNames from 'classnames';import PropTypes from 'prop-types';export class Timeline extends React.PureComponent { render() { const { classes, data, } = this.props; return ( <div ref={this.re... Add solution -
Javascript 2021-09-24 11:40:02
how to convert react component to image
import { exportComponentAsJPEG, exportComponentAsPDF, exportComponentAsPNG } from 'react-component-export-image'; import React from 'react'; class ComponentToPrint extends React.Component { render() { return <div>Hello World</div>; } } e... Add solution -
Other 2021-09-24 11:06:03
changing color dynamically in next js tailwind css
import { useState } from 'react'; import Image from 'next/image'; const NavItem = props =>( <li> <a className="text-md font-bold text-gray-700 px-2 py-1 hover:bg-gray-300 rounded transition-colors duration-300" href={prop... Add solution -
Javascript 2021-09-23 07:37:02
Lazy loading and code splitting in Vue.js
<template> <div> <lazy-component /> </div> </template> <script> const lazyComponent = () => import('Component.vue') export default { components: { lazyComponent } } // Another syntax export default { c... Add solution
Best helpers
Ranking is empty