Class TaskGenerateReactFiles

java.lang.Object
io.jmix.flowui.devserver.frontend.TaskGenerateReactFiles
All Implemented Interfaces:
com.vaadin.flow.server.frontend.FallibleCommand

public class TaskGenerateReactFiles extends Object implements com.vaadin.flow.server.frontend.FallibleCommand
Generate default files for react-router if missing from the frontend folder.

The generated files are App.tsx, Flow.tsx and routes.tsx. Where Flow.tsx is for communication between the Flow and the router and contains the server side route target serverSideRoutes to be used in routes.tsx.

Flow.tsx is always written and thus updates automatically if there are changes.

For internal use only. May be renamed or removed in a future release.

Since:
3.0
  • Field Details

    • NO_IMPORT

      protected static String NO_IMPORT
  • Method Details

    • execute

      public void execute() throws com.vaadin.flow.server.ExecutionFailedException
      Specified by:
      execute in interface com.vaadin.flow.server.frontend.FallibleCommand
      Throws:
      com.vaadin.flow.server.ExecutionFailedException
    • getFileContent

      protected String getFileContent(String fileName) throws IOException
      Throws:
      IOException