Comments (6)
Looks great - that's the best routing approach I've seen. The issue that's driving the lack of dynamic routes is related to lifetimes, and where/how to store the popstate-listening closures so we can remove them when adding new ones... The temporary workaround is to create one closure at the start, and never detach it. Need to solve this first. (I think the relevant part of the code you linked is the external removeEventListener :
part.)
from seed.
yes, at the example, in the didMount
app-level life cycle hook, a closure gets registered with the route map and how it has to be processed. And still in that didMount
hook, the removeEventListener
stuff gets wired up to be run in a closure at component unmount, at:
self.onUnmount(() => ReasonReact.Router.unwatchUrl(watcherID))
from seed.
Iām super stoked about this framework. The dynamic routing is pretty much the only thing blocking me from being able to fully adopt this for a production app (or at least starting to build it).
@David-OConnor if you (or anyone else) is interested in joining the Rust WASM Working Group, I know a lot of folks would be happy to toss ideas around and do some hacking (myself included).
Weekly, Thursdays. The team repo has more info. Will grab a link.
from seed.
Added partial dynamic routing in latest commit. See todomvc example. Still need to specify landing page routing, same syntax as before, but now you can push to pages not included in it. Must pass app state down to routing messages, which adds verbosity, but no longer need to recursively call update.
What do y'all think? Any thoughts on dynamic landing pages? Think programmatically setting up the HashMap is enough, or do we need a regex/recursive-pattern-match approach? Maybe I should change the API to be more like that ReasonMl example; it's nicer.
Interested in the group, but won't necessarily be avail Thu.
from seed.
Latest commit has a complete rework of the routing system; it's now like the ReasonML example. I expect this API to stay the same; it's about as simple as it can get. Might have some changes to make internally re how hash and search are handled.
from seed.
Published in v0.2.5
from seed.
Related Issues (20)
- error[E0425]: cannot find function `wheel_ev` in this scope HOT 1
- 1. Create a new issue in the Seed repo with the name and copy-paste this checklist into it (also add blockers and additional tasks, if exist).
- Maintenance & Future of Seed HOT 8
- v0.9.1: browser::json::Error is inaccessible
- Deserializing large numbers fail HOT 11
- Websocket example does not work HOT 2
- how to integrate with another wasm ?
- Websocket API changed from 0.8 to 0.9 HOT 5
- DOM node is not attached to ElRef under some conditions HOT 6
- Does not build with wasm-bindgen 0.2.81 HOT 3
- Closures need types HOT 3
- Release v0.9.2 HOT 3
- Seed 0.8 accepting the newest wasm-bindgen HOT 3
- [0.8.x] WebSocket and too early dropped closure HOT 1
- support `beforeinput` events HOT 1
- Seed doesn't compile with `default-features = false` HOT 2
- checkbox not working HOT 2
- Release v0.10.0 HOT 3
- Cannot use subs (subs::UrlChanged) HOT 2
- Error: unresolved import in wasm_bindgen_initialize HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seed.