What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-10 00:39:02
on focused text input style react native
You can achieve this by passing in the onFocus and onBlur events to set and unset styles when focused and blurred: onFocus() { this.setState({ backgroundColor: 'green' }) }, onBlur() { this.setState({ backgroundColor: '#e... Add solution -
Other 2021-09-08 18:03:03
lottie npm
import React from 'react'import Lottie from 'react-lottie';import * as animationData from './pinjump.json' export default class LottieControl extends React.Component ... Add solution -
Javascript 2021-09-08 16:15:02
open modal on clicking select option in react
import * as React from 'react'; export class Demo extends React.Component<{}, {}> { state = { options: [ { text: 'doNothing', value: 'doNothing' }, { text: 'openModal', value: 'openModal' } ], open: false }; onClose =... Add solution -
Javascript 2021-09-05 08:33:02
how to update state.item[1] in state using setState? React
handleChange: function (e) { // 1. Make a shallow copy of the items let items = [...this.state.items]; // 2. Make a shallow copy of the item you want to mutate let item = {...items[1]}; // 3. Replace the property you're intested in ... Add solution