Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

224 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goji

🚧 Work in Progress 🚧

React ❤️ Mini Program

Visions

Write React code, run on Mini Programs.

Support these platforms:

  • Wechat
  • Baidu
  • Alipay
  • Toutiao
  • Kuai App ( TBD )
  • Web ( TBD )

Use TARGET=alipay before yarn start to test different platforms.

Usage

import React, { useState } from 'react'
import { View, Text, Button, render } from 'fard' // will rename later
import './index.styl'

const App = () => {
  const [count, setCount] = useState(0)
  return (
    <View>
      <Text>{count}</Text>
      <Button onClick={() => setCount(count + 1)}>+</Button>
    </View>
  )
}

render(App)

For more details see packages/demo-webpack.

Architecture

image

Goji is inspired from fard and remax.

This picture show the architecture of fard.

And here is an article about fard: fard:fre 转小程序的新思路

How to contribute

Since fard use monorepo managed by lerna you should install lerna at first.

npm i -g lerna

Then install all dependencies:

lerna bootstrap

For more details of how to use Lerna see the official documents.

For example run these commands if you'd like to run fard-demo with Webpack:

cd packages/demo-webpack
yarn build

About

React ❤️ Mini Program

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages