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

Test and confirm react.enable flag usage and documentation #19955

Open
tepi opened this issue Sep 16, 2024 · 2 comments
Open

Test and confirm react.enable flag usage and documentation #19955

tepi opened this issue Sep 16, 2024 · 2 comments

Comments

@tepi
Copy link
Contributor

tepi commented Sep 16, 2024

Description of the bug

Currently it is possibly not clear how to use the react.enable flag properly. We need to test which is the correct way of usage and make sure the documentation is up-to-date with that.

@tltv
Copy link
Member

tltv commented Sep 17, 2024

At the moment, the property is needed in maven/gradle configuration and as a runtime property depending on how application is build and run.

It's required in maven/gradle configuration when building:

  • with prepare-frontend goal
  • with build-frontend goal

In runtime in development mode, it depends how application is run.
Maven/gradle configuration works when run with maven.
Maven/gradle configuration is ignored when running directly with java command, or via IDE's Run option in UI.

When running in production mode, default value is based on the production bundle which was build with build-frontend goal. Overriding it with runtime property should not be recommended because then app could be build with/without react, but some runtime feature could think otherwise.

To avoid issues, we should probably recommend adding it in both places and keeping them always same value in both places.

Property is mentioned at least in following pages:

@caalador
Copy link
Contributor

caalador commented Sep 18, 2024

One possibility to document is to have in pom.xml <properties><reactEnable>true</reactEnable></properties> and have in the default application.properties vaadin.react.enable=@reactEnable@
This would sync the pom.xml and application.properties values for the flag.

see https://docs.spring.io/spring-boot/docs/2.0.0.M7/reference/html/howto-properties-and-configuration.html#howto-automatic-expansion-maven

@tltv tltv self-assigned this Sep 18, 2024
tltv added a commit to vaadin/docs that referenced this issue Sep 19, 2024
Document in more detail how `reactEnable` plugin configuration property and `vaadin.react.enable` configuration property works.

RelatedTo: vaadin/flow#19955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 High Priority (P1)
Status: ⚒️ In progress
Development

No branches or pull requests

3 participants