Uh oh!
There was an error while loading. Please reload this page.
Conversation
still need to rework how modules are accessed
Can you shoot me a sample snippet of the syntax for this so I can test? |
@Archmonger here's a demo of how it should work: fromidomimporthtml, component, runfromidom.serverimportstarletteasserver@componentdefShowLocation():
loc=server.use_location()
returnhtml.h1(loc.pathname+loc.search)
run(ShowLocation, implementation=server) |
Archmonger
left a comment
There was a problem hiding this comment.
Might want to rename the PR to "use_location hook" since this isn't routing, but rather location propagation.
Routing = integrated support for rendering different components based on regex path
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
if we poll sync then the server might not ever get a hold of the event loop. this was causing a problem for the sanic server in a test
rmorshea
commented
Apr 5, 2022
@Archmonger, any idea why this test is failing on Windows? |
The way that test is written, I wouldn't expect it to raise anything on any OS? From what I can tell,
Why would you expect |
Scratch that, I see you're trying to symlink the empty I don't think this is a valid test case to be honest. If the user intentionally symlinked a file into our dir, we should consider it safe. In general, symlinks/hardlinks should be considered as "real files" within both their given directories. If you want this to fail for some reason, you'd need to use |
Uh oh!
There was an error while loading. Please reload this page.
By providing access to a
use_locationhook, users can implement primitive routing. The catch is that, at present, state will not be persisted as users navigate between routes. Support for that will have to come in a future update.