Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-mailcheck with all npm packages installed. Try it out:

var reactMailcheck = require("react-mailcheck")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-mailcheck v1.2.0

React component for suggesting emails


React component for the mailcheck library. Reduce user-misspelled email addresses in your forms by suggesting a right domain when your users misspell it in an email address.


npm install --save react-mailcheck


import MailCheck from 'react-mailcheck'

<MailCheck email={this.state.inputText}>
  {suggestion => (
        onChange={(e) => { this.setState({ inputText: }); }}
      {suggestion &&
          Did you mean {suggestion.full}?


- email: String

Required The input email that you want to check.

- children: (suggestion: Object | null) => ReactElement

Required function.

  • suggestion: The suggestion object passed back to you, or null if mailcheck has nothing to suggest. The suggestion object has the following members:
  address: 'test',        // the address; part before the @ sign
  domain: '',    // the suggested domain
  full: ''  // the full suggested email
  • Return: must return a React element to render.






RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free