This file contains hidden or 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
var PostcodeCheck = React.createClass({ | |
// omitting existing code for brevity | |
getInitialState: function() { | |
return { | |
postcode: '', | |
housenumber: '', | |
housenumberAddition: '', | |
result: '' |
This file contains hidden or 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
<%= react_component('PostcodeCheck') %> |
This file contains hidden or 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
<form id="postcodecheck"> | |
<input id="postcode" name="postcode" placeholder="1234AA"> | |
<input id="housenumber" name="housenumber" placeholder="1"> | |
<input id="housenumber_addition" name="housenumber_addition" placeholder="a"> | |
<input type="submit" value="Check!" class="next-button"> | |
<p class="postcodecheck-result"></p> | |
</form> | |
<script> | |
$(function() { |
NewerOlder