Skip to content

Suggestion: load html from file #1

Open
@Gys

Description

One thing I dislike about React&Co is the integration of the html into the code. Can it be separated? So I can work on the html visually for layout and design. Ideally loading the contents of the return statement from a html file instead of integrating it into the code:

  export default function Home(props) {
      const [data, setData] = useState(props.data);
      useEffect(() => {
          fetch("http://localhost:8000/handler")
              .then(x => x.json())
              .then(x => setData(x));
      }, [])
      return (
        // insert contents of index.html
      )
  }

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions