I have summarized and compiled a list of React.JS best practices from various sources across the internet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This component is for creating and editing ctaBoxes. It openes a modal. | |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import classNames from 'classnames'; | |
import linkifyIt from 'linkify-it'; | |
import { stopPropagation } from '../../../utils/common'; | |
import { getFirstIcon } from '../../../utils/toolbar'; | |
import Option from '../../../components/Option'; | |
import { Dropdown, DropdownOption } from '../../../components/Dropdown'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import Header from './Header'; | |
import UserAvatar from './UserAvatar'; | |
import EventsSection from './UserEvents'; | |
import { addUser } from '../actions/userActions'; | |
class EventDashboardPage extends Component { | |
componentDidMount = () => { | |
this.props.dispatch(addUser()); |