Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create requestStaticPropsFromRoute (depends of #105) #108

Merged

Conversation

willybrauner
Copy link
Member

@willybrauner willybrauner commented Jul 7, 2022

Request static props of current route on server side

    const ssrStaticProps: { props: any , name: string } = await requestStaticPropsFromRoute({
      url: "/hello",
      base: "/",
      routes: routesList,
      langService: langService,
    });

@willybrauner willybrauner changed the title Create getStaticPropsFromRoute Create getStaticPropsFromRoute (depend of #105) Jul 7, 2022
@willybrauner willybrauner changed the title Create getStaticPropsFromRoute (depend of #105) Create getStaticPropsFromRoute (depends of #105) Jul 7, 2022
@willybrauner willybrauner changed the title Create getStaticPropsFromRoute (depends of #105) Create requestStaticPropsFromRoute (depends of #105) Jul 7, 2022
@willybrauner willybrauner merged commit b95590d into implement-get-static-props Jul 7, 2022
@willybrauner willybrauner deleted the create-getStaticPropsFromRoute-fn branch July 7, 2022 11:08
willybrauner pushed a commit that referenced this pull request Jul 12, 2022
* Add action and getStaticRoutes to TRoute type

* Inject staticProps in route props

* Add example

* Update package

* Props propagation in getStaticProps

* Add node-fetch as global

* Implement cache

* Add staticPropsCache tests

* Request Global api & global context

* Minor

* Adapt cache

* Fix tests

* Replace node-fetch by isomorphic-unfetch

* fix path to regex and generate index

* Implement SSR langservice (#106)

* Implement ssr langService

* Add comment

* Remove log

* Create requestStaticPropsFromRoute  (depends of #105) (#108)

* Create getStaticPropsFromRoute

* Add lang switcher for test

* Add test for getCurrentRoute

* Add requestStaticPropsFromRoute test

* Remove node-fetch

* Remove unused import

* Clean

* New repos struct (depends of #105) (#109)

* Use pnpm & preconstruct

* Update github action

* Config watch for examples

* Update lock

* Remove Get current route method (#110)

* Update core struct (#111)

* Update core struct

* Externalize helpers

* Add doc

* Update script watch to build:watch

Co-authored-by: Hugo Lefrant <hugo@cher-ami.tv>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant