What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-11 05:50:08
media query for mobile in react file
import React, { Component } from 'react'; class App extends Component { constructor(props) { super(props) this.state = { matches: window.matchMedia("(min-width: 768px)").matches }; } componentDidMount() { const handler = e =&... Add solution -
Javascript 2021-10-06 08:50:04
convert app function to class component react native
const App = () => ( <div> <p> test </p> </div> ); // to convert the above to a class component: class App extends Component { render() { return ( <div> <p> test <... Add solution -
CSS 2021-10-04 04:43:05
react css change number animation
import AnimatedNumber from "animated-number-react"; export default class App extends Component { state = { value: 150, }; handleChange = ({ target: { value } }) => { this.setState({ value }); }; formatValue = (value) => ... Add solution -
Javascript 2021-09-30 21:31:03
ellipsizemode react native example
import React, { Component } from 'react'; import { View, Text, StyleSheet, Platform } from 'react-native'; export default class App extends Component<{}> { render() { return( <View style = { styles.container }> ... Add solution -
Javascript 2021-09-27 07:07:02
Link react router
import React, { Component } from 'react'; import { render } from 'react-dom'; import { BrowserRouter, Route, Switch, Link } from 'react-router-dom'; import { Home } from 'wherever-you-put-it/home.component.jsx'; import { Something } from 'wherever-you-put... Add solution -
CSS 2021-09-26 11:31:06
css transition styled components
import React, { Component } from "react"; import ReactDOM from "react-dom"; import { CSSTransition } from "react-transition-group"; import styled from "styled-components"; const Box = styled.div` width: 300px; ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5