Using React

To use the Node Mask on an input element in React, you need an InputWrapper

import React, { useState } from "react";
import { mask as masker, unMask } from "node-masker";
function App() {
const [value, setValue] = useState("");
const masks = ["99/99/9999", "(999) 999-9999"]
return (
<input
onChange={({ target }) => setValue(unMask(target.value))}
value={masker(value, masks)}
/>
);
}
export default App;

Finished example of how to use the powerful Node Maske