Skip to content

Instantly share code, notes, and snippets.

View dmeents's full-sized avatar
🎯
Focusing

David Meents dmeents

🎯
Focusing
  • allido
  • Portland, OR
  • 00:08 (UTC -12:00)
View GitHub Profile
@dmeents
dmeents / navigation.js
Created July 19, 2016 00:44
The complete source code for the Creating a collapsible navigation menu in react
import React, { Component } from 'react';
import { Link } from 'react-router';
import classNames from 'classnames';
import MobileNav from 'react-icons/lib/io/navicon-round';
//navigation display
export default class NavContainer extends Component {
constructor(props) {
super(props);
this.state = {
//======================
// IMPORT
//======================
import React, { Component } from 'react';
import Reactable from 'reactable';
var Table = Reactable.Table,
Thead = Reactable.Thead,
Th = Reactable.Th;
@dmeents
dmeents / redux-form-tut.js
Created August 6, 2016 20:40
The source code for the redux form tutorial on davidmeents.com
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { connect } from 'react-redux';
import * as actions from '../../actions';
const form = reduxForm({
form: 'ReduxFormTutorial',
validate
});
@dmeents
dmeents / _ticket-control.js
Created August 9, 2016 02:18
How to create a React.js ticketing system using Redux-Form and a MongoDB
//server/controllers/_ticket-control.js
'use strict';
const Tickets = require('../models/tickets');
//===================
// Create Tickets Route
//===================
exports.createTicket = function(req, res, next) {
@dmeents
dmeents / form-fields.js
Last active February 19, 2022 22:02
Rendering a select field in Redux-Form 6 with validation
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
export const renderSelect = field => (
<div>
<select {...field.input}/>
{field.touched && field.error && <div className="error">{field.error}</div>}
</div>
);

Keybase proof

I hereby claim:

  • I am dmeents on github.
  • I am zabok (https://keybase.io/zabok) on keybase.
  • I have a public key ASDcqTWM2Ff3s4G6kzlRAK5YsM6yDjJ0QuoBdBhQ2NLT3Qo

To claim this, I am signing this object: