What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-06 00:15:02
adding mui theme to index.js
import React from 'react'; import { render } from 'react-dom'; import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; import CssBaseline from "@material-ui/core/CssBaseline"; import Root from './Root'; const theme = create... Add solution -
Other 2021-09-05 20:28:01
react click outside class implementation
import React, { Component } from 'react'; import PropTypes from 'prop-types'; /** * Component that alerts if you click outside of it */ export default class OutsideAlerter extends Component { constructor(props) { super(props); this... Add solution -
Javascript 2021-09-05 12:44:02
just show number keyboard react native
/\*\* \* Sample React Native App \* https://github.com/facebook/react-native \* @flow \*/ import React, { Component } from "react"; import { Platform, StyleSheet, View, Button, TextInput, } from "react-native"; expo... Add solution -
Javascript 2021-09-04 22:37:01
How to build an Alert using useEffect
import React, { useEffect, useState } from 'react'; import ReactDOM from 'react-dom'; function LifecycleDemo() { // Pass useEffect a function useEffect(() => { // This gets called after every render, by default // (the first one, and every... Add solution -
Javascript 2021-09-04 17:10:01
using redux with hooks
import React from "react"; import { useDispatch, useSelector } from "react-redux"; import { addCount } from "./store/counter/actions"; export const Count = () => { const count = useSelector(state => state.counter.cou... Add solution