iamkun / iamkun/dayjs

componentWillMount deprecated warnings on React

Open
#901 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**This is not a bug, only a warning**
Just want to make clear to people using this awesome library with React Hooks, that you will get this warning in the console:

> Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
> ...
> Please update the following components: e

I know that there is a react-dayjs library to install that may use hooks already, but i wanted to show dates in the format: "x minutes ago", and I believe thats only possible using dayjs instead of react-dayjs. Let me know if this is not the case!

**Version**
"dayjs": "^1.8.25",
"react-dayjs": "^0.1.6",

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.