i want make /projects conrolled react.
react handles urls among these endpoints:
/projects /projects/123 /projects/123/edit /projects?k=v&k2=v2 ... clicking link outside /projects loads scratch.
question 1:how make react redraw entire page? how make react render /projects /projects/123? has re-render root right?
question 2: how distinguish clicks between say, <a href="/projects/something"> , <a href="/settings/something"> former making react pushstate , latter allowing browser load it?
doing in jquery familiar me, listening clicks on <a ..> elements. should continue way? not links rendered react, user messages example.
question 3: have server api endpoints in /projects, /projects/123 etc. serve when browser (not xhr) hits each endpoint? guess must code each endpoint serve app if accessed browser. or there way avoid redundancy?
Comments
Post a Comment