What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-29 11:20:02
redux saga use navigation
// RootNavigation.js import { createNavigationContainerRef } from '@react-navigation/native'; export const navigationRef = createNavigationContainerRef() export function navigate(name, params) { if (navigationRef.isReady()) { navigationRef.naviga... Add solution -
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 -
TypeScript 2021-09-25 07:52:03
cloudinary
import { v2 as cloudinary, UploadApiResponse } from 'cloudinary' export const cloudStorage = (filename: string): Promise<Record<string, any>> => { return new Promise((resolve, reject) => { cloudinary.config({ cloud_name: process.e... Add solution -
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-22 09:45:03
export array in javascript
// Exporting individual features export let name1, name2, …, nameN; // also var, const export let name1 = …, name2 = …, …, nameN; // also var, const export function functionName(){...} export class ClassName {...} // Export li... Add solution -
Javascript 2021-09-22 01:05:03
angular themeable components
export interface Theme { name: string; properties: any; } export const light: Theme = { name: "light", properties: { "--foreground-default": "#08090A", "--foreground-secondary": "#41474D",... Add solution -
Javascript 2021-09-18 04:19:02
react show view based on role permission
import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const ShowForPermissionComponent = (props) => { const couldShow = props.userPermissions.includes(props.permission); return couldShow ? props.children : null; }; ShowFo... Add solution