Created
November 14, 2018 18:06
-
-
Save hpjaj/b3f357e2e5981fe7adcd43d556226944 to your computer and use it in GitHub Desktop.
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
// app/javascript/components/NewPost.js | |
... | |
import { passCsrfToken } from '../util/helpers' | |
class NewPost extends React.Component { | |
state = { | |
title: '', | |
body: '' | |
} | |
componentDidMount() { | |
passCsrfToken(document, axios) | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment