'how to access class component properties within the same module but outside the class itself

below is my code

class MyEditor extends Component {
    constructor (props) {
        super(props)
        this.state = {
            content: this.props.data
        }
        global.feeds = this.props.feed
    }
    
    render() {
        return (
            <div className="App">
                <br/>
                <CKEditor
                    editor={ Editor }
                    config={ editorConfiguration }
                    data={this.content}
                    onReady={ editor => {
                        // You can store the "editor" and use when it is needed.
                        // console.log( 'Editor is ready to use!', editor );
                    } }
                    onChange={ ( event, editor ) => {
                        const datas = editor.getData();
                        this.props.handleData(datas);
                    } }
                />
                
            </div>
        );
    }
}



export default MyEditor;

this component sends and recieves props at the same time. it recieves props called feed, and saves them in the feeds constant. i would like to access the recieved props, in that same module, but outside that particular class component, i have tried using global.constant to try exporting out of the class, and then store it again in another constant like below

const feeder = global.feeds
console.log(feeder)

this has worked for me, however, its not consistent on page refesh, even at the start of page focus(i mean, when the page is newly opened) the only alternative i have is to use localstorage for page consistency, but this is a component i'd like to use many times in the same project, but supplying it with different values of feed, and localstorage would not be best idea, kindly advise on how best i can achieve this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source