What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-29 08:54:04
validator max e min redux form
import React from 'react' import { Field, reduxForm } from 'redux-form' const required = value => (value || typeof value === 'number' ? undefined : 'Required') const maxLength = max => value => value && value.length > max ? `Must be... Add solution -
Javascript 2021-09-28 14:44:03
how to make a search bar in react django
import * as React from 'react'; import { Searchbar } from 'react-native-paper'; export default class MyComponent extends React.Component { state = { firstQuery: '', }; render() { const { firstQuery } = this.state; return ( <Se... Add solution -
TypeScript 2021-09-28 08:55:02
Cannot find module .svg' or its corresponding type declarations.
// Create a file named custom.d.ts with the following content: declare module "*.svg" { const content: any; export default content; } // Add the custom.d.ts to tsconfig.json as below "include": ["src/components", "sr... Add solution -
Javascript 2021-09-28 08:05:07
component did mount mutation graphql
import React from 'react'; import { Mutation } from 'react-apollo'; class DoMutation extends React.Component { componentDidMount() { const { mutate } = this.props; mutate(); }; render() { return null; }; }; const MutationOnMount = (... Add solution -
Javascript 2021-09-28 05:45:02
react pdf add to existing pdf
import React, { PureComponent } from "react" import { Document, Page } from "react-pdf/build/entry.webpack" import throttle from "lodash.throttle" import pdf from "./pdf.pdf" class App extends PureComponent { con... Add solution -
Javascript 2021-09-28 03:59:04
route to change a part of component
<Route exact path="/" render={props => ( <Page {...props} component={Index} title="Index Page" /> )} /> <Route path="/about" render={props => ( <Page {...props} component={About} t... Add solution -
CSS 2021-09-28 03:51:03
fullcalendar react
import interactionPlugin from "@fullcalendar/interaction"; // needed for dayClick export default class DemoApp extends React.Component { render() { return ( <FullCalendar dateClick={this.handleDateClick} plugins={[ dayGridPlugin... Add solution -
Javascript 2021-09-28 02:07:02
Autocomplete an Address with a React hook Form
import React from "react"; import { useForm } from "react-hook-form"; export default function App() { const { register, handleSubmit, errors } = useForm(); const onSubmit = data => console.log(data); return ( <form on... Add solution
Best helpers
Ranking is empty