Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Example extends Component {
- componentDidMount() {
- const myVariable = 'this thing';
- }
- componentDidUpdate() {
- // I'd like my variable to be accessible here
- console.log(myVariable);
- }
- render() {...}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement