Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document common console messages and their resolution #23

Open
bobbingwide opened this issue Jan 12, 2019 · 5 comments
Open

Document common console messages and their resolution #23

bobbingwide opened this issue Jan 12, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

To help with future development of blocks, it would be nice to accumulate some of the console messages that are seen when developing blocks and the problem resolution.
e.g.

BlockiconsSelect(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

In a class that extends component, the render() method should return something.
wrong code

render() {
        <ul>
            <li>oik-csv icon?</li>
        </ul>
    }

corrected code

render() {
        return(
            <ul>
                <li>oik-csv icon?</li>
            </ul>
        )
    }
@bobbingwide
Copy link
Owner Author

Now see if you can find the other instances of problems and their fixes and link to them.

@bobbingwide
Copy link
Owner Author

Objects are not valid as a React child (found: object with keys {src}).

@bobbingwide bobbingwide self-assigned this Jan 13, 2020
@bobbingwide bobbingwide added the enhancement New feature or request label Jan 13, 2020
@bobbingwide
Copy link
Owner Author

One year on and I haven't got very far have I?
Here's some more Warnings from the console.
I have no idea what they mean.

react-dom.8b3dda97.js?ver=16.9.0:539 Warning: Legacy context API has been detected within a strict-mode tree: 
    in StrictMode (created by t)
    in t (created by WithDispatch(t))
    in WithDispatch(t)
    in Unknown (created by WithSelect(WithDispatch(t)))
    in WithSelect(WithDispatch(t))

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: Connect(m), Connect(y)

Learn more about this warning here:
https://fb.me/react-legacy-context

followed by a similar message

react-dom.8b3dda97.js?ver=16.9.0:11632 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Connect(m), Connect(y)

@bobbingwide
Copy link
Owner Author

Here's some more Warnings from the console.
These warnings appear to emanate from WordPress SEO. If I deactvate WordPress SEO then I don't get the problems.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 13, 2020

From UK slack channel, I'd posted this earlier today. No one replied.
backend.js:6 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

This happens with WordPress 5.3.2, no plugins and the TwentyTwenty theme.
Should I just ignore Warnings like this?

It doesn't happen in cwiccer.com.
This is because SCRIPT_DEBUG is true in s.b/wp53 but not set in cwiccer.
Issue raised against Gutenberg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant