Migration to Gutenberg: Remove references to react
Opened this issue · 1 comments
ItsJonQ commented
Due to how the JS code is compiled, Gutenberg React code does not start with the standard import React from 'react';
.
Hooks and utils that come from the react
package would instead come from @wordpress/element
.
For example, we'll need to refactor code from this:
import React, { useRef } from 'react'
to:
import { useRef } from '@wordpress/element';
This is something we'll either do as a final step within this @itsjonq/g2
repo before migration.
Or, this is something we'll refactor when the code lands within Gutenberg.
ItsJonQ commented
We'll do this when we copy/paste the files into Gutenberg.
Moving this to Phase 2.