EjZeYG ('-' * 6)
A Pen by chris anderson on CodePen.
// src/container/form1.js | |
// when i add a file to this input, it triggers the FORM2 reducer's case: redux-form/CHANGE' and calls function in FORM2. | |
<input type="file" {...fileField}/> | |
// src/redux/modules/form1.js | |
export default function reducer(state = initialState, action = {}) { | |
switch (action.type) { | |
case FILE_SELECTED: | |
return {....} | |
} |
import React, { Component, PropTypes } from 'react'; | |
import {reduxForm} from 'redux-form'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux'; | |
import * as dataMapActions from 'redux/modules/dataMap'; | |
import {updateFieldMap} from 'redux/modules/dataMap'; | |
@connect( | |
state => ({ | |
fieldMap: state.dataMap.fieldMap, |
const initialState = { | |
fieldMap = [] | |
} | |
// take result, push objects to fielMap array | |
const createFieldMap = (result, fieldMap, fieldMapMade) => { | |
if (!fieldMapMade) { | |
result.headers.map((key, index) => { | |
const cardIndex = index; | |
const samplesArr = []; |
# First: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
#go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
EjZeYG ('-' * 6)
A Pen by chris anderson on CodePen.
A Pen by chris anderson on CodePen.