JSFiddle - React, Tailwind, and code Playground

by r3wt

HTML

<input type="text"></input>

JavaScript

$(function(){
    $('input, textarea').keyup( function(){
        var inputs = $(this).val();
        $(this).val(inputs.replace(/[^a-z0-9\s]/gi, ''));   
    });
});