Node should use compiled version
When I load this to be rendered server-side in node I get:
node_modules/react-ux-password-field/src/index.js:229
infoBar = <div className="passwordField__info" style={this.infoStyle}>
^
SyntaxError: Unexpected token <
This is because I have babel setup to only transpile .jsx files. The issue is solved if I change package.json to point to the compiled ./lib/react-ux-password-field.js instead.
Actually seems there are quite a lot of issues preventing this from being rendered server-side, including the use of componentWillMount() instead of componentDidMount() and references to navigator in render().
Yeah, that makes perfect sense. This component was mostly an experiment, and didn't take server-side rendering into account.
If you'd like to submit a PR, I'd be happy to merge it in.
Thanks.
:+1: for this one. Any updates available?
@tsironis can you confirm what your issue is here? is it "main" pointing to the src file?