Giter Club home page Giter Club logo

Comments (3)

chrisvxd avatar chrisvxd commented on August 30, 2024

@Roshan54321 What's exactly your use case? When you say JS for interactivity, are you talking about hydrating back to React? Why do you want to store HTML and JavaScript separately?

Measured actually has another library that might help you here: https://github.com/measuredco/react-from-html

But it's hard to know for sure without knowing more about your architecture.

from puck.

Roshan54321 avatar Roshan54321 commented on August 30, 2024

@Roshan54321 What's exactly your use case? When you say JS for interactivity, are you talking about hydrating back to React? Why do you want to store HTML and JavaScript separately?

Measured actually has another library that might help you here: https://github.com/measuredco/react-from-html

But it's hard to know for sure without knowing more about your architecture.

yes,but I have a large codebase where this builder is one of the features. I want to deploy a site irrespective of my whole codebase built from puck but how do I do it?

I can set aside the static html but I want interactivity too. Hydrating, yes, but how do I separate my whole codebase from just the site? That would compel me to make another React, but that too needs the config for Render.

I dont know if that makes any senseπŸ˜…, but I cant find a reasonable way.

from puck.

chrisvxd avatar chrisvxd commented on August 30, 2024

In a large application, the cleanest way is to split the rendered Puck output into a separate application. A a monorepo can help to easily share components.

Alternatively, you can trust in code splitting rather than worrying about splitting up the HTML and JS.

I'm going to move this to a discussion.

from puck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.