JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" name="foo">
    <a href="http://example.com/{value of foo}">Link</a>

JavaScript

$('[name=foo]').blur(function(){
    var hrefVal = $(this).siblings("a").attr("href");
   $('a').attr("href", hrefVal + $(this).val());
});