Examples

Often the best way to learn something, is to learn from examples. While we do not provide much examples yet, we highly appreciate any help to provide some useful examples.

React

A simple example application using the React bindings.

git clone https://github.com/rofrischmann/fela.git

cd fela/packages/example-react
npm install
# starts the universal rendered application at localhost:8080
npm start

# starts the client-side application at localhost:8080
npm run client

Covers

  • Rules
  • Keyframes
  • Fonts
  • Static Styles
  • React Bindings
  • Dynamic Rules
  • Plugins
  • Server-side Rendering

Preact

A simple example application using the Preact bindings. The example is the same as the React example above.

git clone https://github.com/rofrischmann/fela.git

cd fela/packages/example-preact
npm install
# starts the universal rendered application at localhost:8080
npm start

# starts the client-side application at localhost:8080
npm run client

Inferno

A simple example application using the Inferno bindings. The example is the same as the React example above.

git clone https://github.com/rofrischmann/fela.git

cd fela/packages/example-inferno
npm install
# starts the universal rendered application at localhost:8080
npm start

# starts the client-side application at localhost:8080
npm run client

React Native

A simple example application using the React bindings and the React Native renderer.

git clone https://github.com/rofrischmann/fela.git

cd fela/packages/example-react-native
npm install
npm start

Afterwards open one of the platform specific native projects and run with a simulator.

Covers

  • React Native
  • Rules
  • React Bindings
  • Dynamic Rules
  • Plugins

Angular 2

The code examples are based on the build-chain as used in Angular 2 ESNext TodoMVC.

git clone https://github.com/rofrischmann/fela.git
cd fela/packages/example-angular2
npm install
npm run start

Covers

  • Rules
  • Angular Service
  • Dynamic Rules

TypeScript

The same example is also available in TypeScript. It also covers Fela typings.

git clone https://github.com/rofrischmann/fela.git
cd fela/packages/example-angular2-typescript
npm install
npm run start

results matching ""

    No results matching ""