How use wp media upload liberary in react components?
here is my solution import React, { useState, useEffect } from ‘react’ import _ from ‘lodash’ export default function FeaturedImage(props) { _.noConflict() let frame const runUploader = (event) => { event.preventDefault() // If the media frame already exists, reopen it. if (frame) { frame.open() return } // Create a new media frame frame = wp.media({ … Read more