2

How to import autobind from 'office-ui-fabric-react? I tried by using this method import { autobind } from 'office-ui-fabric-react/lib/Utilities';

But it showing error like Module '"office-ui-fabric-react/lib/Utilities"' has no exported member 'autobind'

1 Answers1

2

The function was removed from the module and most likely does not exist in the version of the module you are using. You can downgrade to an earlier version which is not recommended or you use arrow functions. See guide from Microsoft in the link below.

https://github.com/microsoft/fluentui/wiki/TypeScript-Guidelines#use-arrow-functions-instead-of-bind

ayodele
  • 186
  • 5