Coder Social home page Coder Social logo

Comments (10)

LorenDorez avatar LorenDorez commented on September 26, 2024 1

Just an update here. I have a working POC to handling CSS-in-JSS libraries like Styled and Emotion. I got the ideas from the Emotion creator as he worked with Styled, NextJS and the react devs to try to find a workaround until some new APIs posisble come out from the React devs.

I needed this support for MUI which I use heavily. the POC is pretty ugly but was waiting on another issue on posted to see if a pull request would be allowed. I havent heard back yet so i might just fork this project and clean up my POC

from nodereact.net.

rshackleton avatar rshackleton commented on September 26, 2024

@DaniilSokolyuk is there any likelihood that this would be looked into?

The library is very promising but not having the ability to support CSS-in-JS libraries via Render Functions is also a blocker for me.

from nodereact.net.

rshackleton avatar rshackleton commented on September 26, 2024

Just having a very quick look and I guess the approach would be much trickier whilst supporting streaming.

https://styled-components.com/docs/advanced#streaming-rendering

Perhaps a custom interop would be needed to coordinate the renderToNodeStream wrapper?

from nodereact.net.

DaniilSokolyuk avatar DaniilSokolyuk commented on September 26, 2024

We're using the new 'renderToPipeableStream' API. Additionally, we have the ability to render an entire page in a React component, like this https://github.com/DaniilSokolyuk/NodeReact.NET/blob/master/NodeReact.Sample.Streaming/ClientApp/components/App.jsx

from nodereact.net.

DaniilSokolyuk avatar DaniilSokolyuk commented on September 26, 2024

Issue is here styled-components/styled-components#3658

from nodereact.net.

rshackleton avatar rshackleton commented on September 26, 2024

That is interesting, I was looking at whether we could use this to migrate away from ReactJS.NET and retain the island architecture approach vs rendering the entire site as a React app.

My concern is enabling SSR for React components within a .NET site which needs to run on Razor in order to interface with the CMS.

I suppose the CSS-in-JS issue could be circumvented by using a library that doesn't have runtime JS like Linaria or Vanilla Extract, or using something like Tailwind.

from nodereact.net.

DaniilSokolyuk avatar DaniilSokolyuk commented on September 26, 2024

I will try next week to make a legacy mode that uses renderToString

from nodereact.net.

rshackleton avatar rshackleton commented on September 26, 2024

That would be great for backwards compatibility. I'm going to trial it on a project which is currently using Tailwind. The lack of render functions shouldn't be an issue in this case.

from nodereact.net.

rshackleton avatar rshackleton commented on September 26, 2024

@LorenDorez please share your fork here if you do. 👍

from nodereact.net.

ellinge avatar ellinge commented on September 26, 2024

I am also interested in in a fork for render functions support. Had to go back to ReactJs.NET in a project ported from framework to .Net 8. I did not see a clear solution of how to fix it in another way currently with NodeReact.

But since ReactJs.NET is in maintenance mode and I’ve already had to fork it for React 18-support it would be better if one could migrate to this instead.

from nodereact.net.

Related Issues (8)

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.