Skip to content

Commit 81f8da8

Browse files
Apply suggestions from code review
Co-authored-by: Alexey Romanov <[email protected]>
1 parent 1f61210 commit 81f8da8

File tree

2 files changed

+2
-2
lines changed
  • lib/generators/react_on_rails/templates

2 files changed

+2
-2
lines changed

lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface HelloWorldProps {
66
}
77

88
const HelloWorld: React.FC<HelloWorldProps> = (props) => {
9-
const [name, setName] = useState<string>(props.name);
9+
const [name, setName] = useState(props.name);
1010

1111
return (
1212
<div>

lib/generators/react_on_rails/templates/redux/base/app/javascript/bundles/HelloWorld/components/HelloWorld.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const HelloWorld: React.FC<HelloWorldProps> = ({ name, updateName }) => (
1919
id="name"
2020
type="text"
2121
value={name}
22-
onChange={(e: React.ChangeEvent<HTMLInputElement>) => updateName(e.target.value)}
22+
onChange={e => updateName(e.target.value)}
2323
/>
2424
</label>
2525
</form>

0 commit comments

Comments
 (0)