- Added
- Implemented soft errors.
- From this version onward, it will try to generate special variables like
TODO_this
to indicate errors and continue transformation. - It allows you to automate more transformation while using manual rewriting when necessary.
- Not all errors are soft errors, but we will continue to make as many errors soft errors as possible.
- From this version onward, it will try to generate special variables like
- Implemented soft errors.
- Misc
- Internal housekeeping, including introduction of GitHub Actions, Prettier, and ESLint.
- Added
- Support for method-binding patterns e.g.
this.foo = this.foo.bind(this);
- Support for multiple states in one
setState()
call
- Support for method-binding patterns e.g.
- Added
- Implement MVP for componentDidMount/componentDidUpdate/componentWillUnmount
- Fixed
- Don't fail if user-defined class field (e.g.
this.foo
) is assigned without initializing.
- Don't fail if user-defined class field (e.g.
- Added
- Add support for
useCallback
- Add support for
- Fixed
- Use function declaration instead of function expression when possible
- Added
- Add support for more type annotations on methods
- Add support for modifying types reflecting
defaultProps
- Add support for
React.PureComponent
- Add support for generics
- Added
- Add support for refs (types are supported as well)
- Add support for state types
- Add support for opt-out in one of:
@abstract
JSDoc commentabstract
modifierreact-declassify-disable
comment
- Fixed
- Keep generator/async flags
- Fix renaming failure in some cases
- Fix local variable conflict when the name was introduced in an inner block.
- Fix
this.props
,this.setState
, and so on not being accounted for when they are declared in the constructor.
- Added
- Add support for
const { ... } = this.state
- Rename methods if necessary
- Add support for
- Misc
- Refactoring
- Added
- Add support for
this.state
initialization in constructor - Add support for
defaultProps
- Add support for
- Misc
- Heavily refactored internal analysis
- Added
- Add support for
export default class
declarations - Add support for class fields initialized as functions
- Add support for
- Fixed
- Fix emission of hoisted props
- Added
- Transform
P
type argument - Transform
setState
(simple case)
- Transform
Initial experimental release.