-
Notifications
You must be signed in to change notification settings - Fork 79
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
React hybrid routing #4710
Comments
Tested Hilla view -> Flow view navigation and navigation lifecycle events: |
Minimal documentation on getting the combination to work Adding Flow to a Hilla-react project. (sample from CRM tutorial)
|
Enabling |
Access control seems to work fine for Flow view.
However, one thing that doesn't work is navigating to Hilla view that is protected by a role. In the browser console log I see that UserInfoService returns "ROLE_USER" to the client and login method returns no errors. Maybe my project configuration is incorrect. I followed this tutorial https://hilla.dev/docs/react/guides/security/spring-login. Here is my test project. @platosha could you please verify my test project when appropriate ? |
com.vaadin.experimental.reactRouter=true
|
* feat: Explain React Router integration for Vaadin Flow Related-to vaadin/platform#4710 * lint fixes * Apply suggestions from code review Co-authored-by: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com> Co-authored-by: caalador <mikael.grankvist@vaadin.com> * Moved to Integrations and added discussion id * Clarification about dependencies and CRM * Change page extension and order * Update guide * Initial Edits * Second more thorough edits. * Third full edits. --------- Co-authored-by: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com> Co-authored-by: caalador <mikael.grankvist@vaadin.com> Co-authored-by: russelljtdyer <6652767+russelljtdyer@users.noreply.github.com>
So the issue with React routes redirect was that the server returns |
This ticket/PR has been released with Vaadin 24.4.0. |
Description
Support routing to Flow views in React+Hilla applications using React Router.
Use cases
As a developer
I want to extend my React+Hilla application with server-side Flow views
So that I can benefit from Flow provided features, e.g. server-side navigation, Push and others.
As a developer
I want to extend my Flow application with React-based views/components using Hilla
So that I can benefit from using React where I want.
Acceptance criteria
@ClientCallable
and methods inFlow.js
, so that this integration doesn't bring major changes in Flow API.App.tsx
androutes.tsx
that is needed to connect React Router with the Flow APIGeneral criteria
APIs reviewed
Done in the PR review, see linked PR.
Design
Prototypes https://gitlab.vaadin.com/flow/flow-hilla-react-proto and https://github.com/platosha/proto-hilla-react-hybrid
Performance (N/A)
UX/DX tests in Alpha
Documentation:
https://vaadin.com/docs/latest/flow/integrations/hilla
How to test?
Auto-test in Flow https://github.com/vaadin/flow/tree/main/flow-tests/test-react-router
@vaadin/router
viareactEnabled=false
config parameter.Security (N/A)
The text was updated successfully, but these errors were encountered: