question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 't' of null (when inspecting tree using React dev tools)

See original GitHub issue

Describe the bug When I’m inspecting a function component with the React dev tools that uses the useTranslation hook, I’m getting the following error:

Screenshot 2019-08-19 10 22 34

In my component:

const { t } = useTranslation("producers");

Probably this line: https://github.com/i18next/react-i18next/blob/master/src/useTranslation.js#L79

Occurs in react-i18next version i18next: 15.0.8 react-i18next: 10.6.0 React: 16.8.3

To Reproduce Inspect the component using React dev tools

Expected behaviour No TypeError

Screenshots crash

OS (please complete the following information): Chrome 76 (macOS 10.14.4)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
staka121commented, Oct 16, 2019

useState used in React dev tools is not supported, before React 16.9.0. However, react-i18next used useState in React dev tools. Probably cause that ‘t’ was null is this.

Add support for editing useState state from DevTools. (@bvaughn in #14906) https://github.com/facebook/react/releases/tag/v16.9.0

The simple solution is to update React after v16.9.0.

0reactions
jamuhlcommented, Sep 17, 2019

closing this due inactivity…PR still welcome

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'click' of null Chrome Extension - Stack ...
Your code runs before the #clicker element loaded (since it's above it); therefore, that element does not exist at that moment, document.
Read more >
Uncaught TypeError: Cannot read property '1' of undefined
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . Uncaught TypeError: Cannot...
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
That error message is telling you the function is returning undefined implicitly, but its return type does not include undefined in it. Awesome!...
Read more >
A guide to features and updates in React DevTools
In this article, we'll demonstrate how you can use React DevTools's various features that you might not have tried yet (or didn't even...
Read more >
useHooks - Easy to understand React Hook recipes
We bring you easy to understand React Hook code recipes so you can learn how React hooks work and feel more comfortable writing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found