Skip to content

Instantly share code, notes, and snippets.

View andyfaizan's full-sized avatar
🎮
Focusing

Ainuddin Faizan andyfaizan

🎮
Focusing
View GitHub Profile
// Parent.jsx
class Parent extends React.Component {
constructor() {
super();
console.log("Parent constructor"); // 1
}
componentDidMount() {
console.log("Parent CDM"); // 2
}
render() {
import React, { Component } from 'react';
import { Row, Button } from 'reactstrap';
//files
import './help.css';
import Close from '../../img/icons/close_orange.svg';
import Arrow from '../../img/icons/hilfe_arrow.svg';
class help extends Component {
constructor(props) {
if (window.innerWidth < 1025) {
this.setState({
isBelow1025: true,
})
} else {
this.setState({
isBelow1025: false,
})
}
@andyfaizan
andyfaizan / Newsletter.js
Created November 26, 2018 20:32
No formatting..look at line 20. Even if we ignore the long text, there are other elements being added at the end which should be on the next line
import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { Field, reduxForm } from "redux-form";
import { customInput } from "./fields";
import { required, email } from "../validation";
import "./RegisterForm.css";
class Newsletter extends Component {
render() {
const { handleSubmit, isButtonActive, buttonText } = this.props;
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import '../App.css';
//media
import Close from './../img/icons/close_orange.svg';
export default class Oems extends Component {
componentDidMount() {