Skip to content

samuli/bucklescript-tea-server-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Experimenting with initializing a bucklescript-tea application to a pre-rendered DOM outputted by react-snap.

Uses a patched version of bucklescript-tea.

Install

npm install

Testing

Copy release/index.html.tpl > release/index.html

npm run build
npm run snap
npm run watch

How does it work

Initial model data for the application is specified in index.html.

react-snap renders index.html and inserts the HTML outputted by bucklescript-tea to the body-tag:

bucklescript-tea app is inited with a hydrate-flag that specifies whether the application should be inited from scratch (for react-snap) or to a pre-renderd DOM (browser).

Note: remove release/200.html and copy release/index.html.tpl > release/index.html if you need to re-run react-snap.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published