Skip to content

Zaid-Ajaj/Bridge.Ractive

Repository files navigation

Intro

This library provides means to works with Ractive.js with C# in your Bridge.NET project.

Installation

The easiest way to use Ractive in your Bridge.NET project is to copy and paste the contents of Generated.Ractive.cs file in your project. This way there are no binary dependencies and you can tweak it however you want.

Another way to install is from Nuget Install-Package Bridge.Ractive

Usage

Assuming you have a class where app state is defined

[ObjectLiteral]
class State { public string Message; }

Create an instance of Ractive

var ractive = new Ractive(new RactiveOptions 
{
    Element = "#app", // the id of the element to which the template will be bound
    Template = "<h1> {{ message }} </h1>",
    Data = new State 
    {
        Message = "Hello from C#"
    }
});

The Bridge.Ractive.Example demonstrates a complete todo app with Brige.Redux as the state container

screenshot

About

Bindings of Ractive.js to be used in Bridge.NET projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published