Closed faceyspacey closed 7 years ago
side note: recommendation: put a react server rendering example on the homepage. it will be good for marketing :) ...and figure out and publicize the ins and outs of react using Dawson to make react developers comfortable with it.
Thank you very much for your input.
Just to clarify your use case, would you like to use this configuration to implement React SSR?
Wildcards are not currently supported due to API Gateway limitations (& we're not using API Gateway's Proxy feature). I'm leaving this issue open since I'd like to discuss this further and merge an implementation in April.
Any suggestion, example, PR or more details will be really appreciated :)
Thanks for your feedback,
Tracking in #168, this should already work:
path: 'bar/{any+}'
with the any
being anything you like (you'll want to use its value to get the current pathname in Lambda functions); the "+" symbol defines a greedy path variablebar/
bar
or bar/
, for which you need to specify its own function+pathANY
dummy method is implemented in #168 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
dawson now has full support for the ANY method and greedy path variables :tada:
Example: 3-wildcard-path Documentation: README
(releasing in v0.28)
Thats awesome. I've been waiting to really dive in with your toolset and make it work with my 2 boilerplates/demos for my 2 React open source product lines:
https://github.com/faceyspacey/universal-demo https://github.com/faceyspacey/redux-first-router-demo
More importantly though, I gave you a shoutout in my SurviveJS interview that just went out a few hours ago:
https://www.reddit.com/r/reactjs/comments/6scchf/reduxfirst_router_just_dispatch_actions_interview/
Can't wait to immerse myself in dawson!
Thank you very much James!
I'll be more than happy to hear your feedback and help with any issue you may experience with dawson. Please also share anything that it's missing, unclear, needs better documentation, or does not work as expected (just remember to npm install -g @dawson/dawson-cli
with the scoped package name).
Thank you for the SurviveJS intro too, I'll complete the interview in the coming days :-)
Have a great day, Simone
I'm trying to figure out how this would best work with React where you have a single endpoint mapped from
'*'
. It seems that's not possible--so what do you do? Copy the same function for 4-6 different endpoints, e.g:copy 1 of the function:
path: '/{part1}'
copy 2 of the function:
path: '/{part1}/{part2}'
copy 3 of the function:
path: '/{part1}/{part2}/{part3}'
copy 4 of the function:
path: '/{part1}/{part2}/{part3}/{partEtc}'