Hi - I came across the thread and found it really useful. However, I have a different problem.
I am developing a PCF control that consumes a JSON payload from SharePoint and renders it as two vertical stacks. 1 for Folders and one for files in that folder. My users are unwilling to use SharePoint natively so this control mimics the behavior of a legacy system.
We query all of the SharePoint Document Library at the outset and the JSON is therefore static.
The desired behavior is for a user to click on button for the named folder then see the folders in the “drilled-down” folder.
I can render as desired and the OnClick events fire as expected.
However, I can’t seem to use the requestrender method as I control call defined in the tsx file doesn’t seem to have a valid context.
Am I using the wrong pattern altogether, or is it “just” a case of getting the context into my react class and the subclasses that I use for the folder menu?