You probably came here because your code is calling your component as a plain function call. This is now deprecated:
var MyComponent = require('MyComponent');
function render() {
return MyComponent({ foo: 'bar' }); // WARNING| /** | |
| * Sort array of objects based on another array | |
| */ | |
| function mapOrder (array, order, key) { | |
| array.sort( function (a, b) { | |
| var A = a[key], B = b[key]; | |
The following list tries to summarize some of the things that a developer may encounter while learning React. The list focuses on scenarios that result in actual bugs (things that don't work) or things that cause warnings in the console.
| import { useEffect, useRef } from 'react'; | |
| import { useHistory, useLocation } from 'react-router-dom'; | |
| import { UnregisterCallback } from 'history'; | |
| /** | |
| * Hook auxiliar. Referência para implementação: | |
| * - https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state; | |
| * - https://usehooks.com/usePrevious/; |
| import { | |
| fromUnixTime, | |
| format, | |
| } from "date-fns" | |
| /** | |
| * Checks if a timezone string is valid or not | |
| * | |
| * We do this to catch typos. | |
| * |