Skip to content
Authoring React Components with Fable
JavaScript F# HTML CSS Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
fs-elmish-sample-component
fs-react-sample-component
js-test
slides
.gitignore
.gitmodules
README.md
outline.txt

README.md

SouthernFriedReact

Authoring React Components with Fable

Why

Because we can.

What?

fs-react-sample-component

Sample F# React component which can be build and published to NPM
cd fs-react-sample-component
yarn build
npm link
# optionally yarn watch

cd ../js-test
yarn
npm-link fs-react-sample-component
yarn start

fs-elmish-sample-component

Sample showing how to convert an Elmish app to a react component which can be embedded in a regular JavaScript page.

js-test

Javascript test project which includes the f# project without reference to fable

How

Magic, probably.

Demo

https://unpkg.io/react@15.6.2/dist/react.min.js https://unpkg.io/react-dom@15.6.2/dist/react-dom.min.js https://unpkg.com/fs-react-sample-component@0.0.2/build/index.js

References

  1. https://medium.com/@BrodaNoel/how-to-create-a-react-component-and-publish-it-in-npm-668ad7d363ce
  2. https://blog.nojaf.com/2018/12/17/writing-a-vscode-extension-with-fable-2-1/
You can’t perform that action at this time.