How to use Flux and event emitter with .net MVC?

前端 未结 2 1691
[愿得一人]
[愿得一人] 2021-01-02 20:14

I am trying to learn the Flux pattern.

I learned to use React with .net MVC and rendered it server side.

I would like to learn Flux but all tutorials use n

相关标签:
2条回答
  • 2021-01-02 20:21

    We do use the flux pattern on the client side without having node.js installed on our web servers. In order to do this we have to use Node.js at build time on our Team City CI servers to run a gulp task that pushes the .jsx files through the jsx interpreters and spit out a raw js file. Now our flux application is a essentially a static .js file that has already been interpreted by Node.js

    0 讨论(0)
  • 2021-01-02 20:37

    You can use .NET Delegates, which is well documented here https://msdn.microsoft.com/en-us/library/edzehd2t%28v=vs.110%29.aspx

    Delegates are multicast, which means that they can hold references to more than one event-handling method.

    This will of course be a server-side implementation of the Flux pattern.

    0 讨论(0)
提交回复
热议问题