Problems displaying spfx webpart

%3CLINGO-SUB%20id%3D%22lingo-sub-643674%22%20slang%3D%22en-US%22%3EProblems%20displaying%20spfx%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-643674%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei'm%20developing%20a%20simple%20spfx%20webpart%20that%20uploads%20a%20file%20to%20a%20sharepoint%20document%20library.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20well%20on%20the%20workbench.%20I%20am%20able%20to%20add%20it%20to%20a%20page%2C%20and%20the%20first%20time%20I%20add%20it%20to%20the%20page%20it%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20refresh%20the%20page%2C%20the%20webpart%20does%20not%20display%20anymore.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20should%20I%20debug%20this%20problem%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-643674%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686678%22%20slang%3D%22en-US%22%3ERe%3A%20Problems%20displaying%20spfx%20webpart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686678%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F348176%22%20target%3D%22_blank%22%3E%40malafontaine%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20your%20web%20part%20written%20in%20React%3F%20Sounds%20like%20you%20might%20have%20some%20state%20management%2Flifecycle%20issues%20going%20on.%20Can%20you%20share%20your%20code%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi,

 

i'm developing a simple spfx webpart that uploads a file to a sharepoint document library.

 

It works well on the workbench. I am able to add it to a page, and the first time I add it to the page it works.

 

When I refresh the page, the webpart does not display anymore.

 

How should I debug this problem?

1 Reply
Highlighted

@malafontaine 

 

Is your web part written in React? Sounds like you might have some state management/lifecycle issues going on. Can you share your code?