What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2022-02-03 00:00:26
react protected routes typescript
/*SM*/ /*example implemented with and FC and Typescript*/ import { Redirect, Route, RouteProps } from 'react-router'; export type ProtectedRouteProps = { isAuthenticated: boolean; authenticationPath: string; } & RouteProps; export default functi... Add solution -
Javascript 2022-02-02 19:51:32
select everything but an element in react
import reactDom from "react-dom"; import history from "../history"; const Modal = () => { return reactDom.createPortal( <div onClick={() => history.push("/")} className="ui dimmer modals visib... Add solution -
Javascript 2022-02-02 18:46:44
rewrite src/App.js
// frontend/src/App.js import React, { Component } from "react"; import { BrowserRouter, Route, Switch } from "react-router-dom"; import Home from "./components/Home"; class App extends Component { render() { return ( ... Add solution -
Javascript 2022-02-02 11:26:06
material ui change button to custom color
/* style={{backgroundColor: '#12824C', color: '#FFFFFF'}} backgroundColor changes the button color color changes the text color These examples use Hex to define the color (Green button with white text) */ // Example import React from 'react'; import Bu... Add solution -
Javascript 2022-02-01 22:45:24
nuxt error page
// layouts/error.vue <template> <div class="nuxt-error"> <component :is="errorPage" :error="error" /> </div> </template> <script> import error404 from '~/components/error/404.vue'; ... Add solution
Best helpers
Ranking is empty