{"id":18832369,"url":"https://github.com/brainpoint/febs-react-web","last_synced_at":"2026-04-09T07:05:29.408Z","repository":{"id":57199041,"uuid":"66441776","full_name":"brainpoint/febs-react-web","owner":"brainpoint","description":"A framework for building web apps with React","archived":false,"fork":false,"pushed_at":"2017-07-14T08:43:47.000Z","size":2272,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T12:05:51.998Z","etag":null,"topics":["febs","js","react","react-native","react-webpack","ui","ui-components","webapp","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainpoint.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-24T07:32:43.000Z","updated_at":"2017-07-14T08:35:58.000Z","dependencies_parsed_at":"2022-09-16T15:01:31.674Z","dependency_job_id":null,"html_url":"https://github.com/brainpoint/febs-react-web","commit_stats":null,"previous_names":["brainpoint/citong-react-web"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpoint%2Ffebs-react-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpoint%2Ffebs-react-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpoint%2Ffebs-react-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainpoint%2Ffebs-react-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainpoint","download_url":"https://codeload.github.com/brainpoint/febs-react-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239768935,"owners_count":19693763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["febs","js","react","react-native","react-webpack","ui","ui-components","webapp","webpack"],"created_at":"2024-11-08T01:57:39.774Z","updated_at":"2025-12-30T23:00:35.178Z","avatar_url":"https://github.com/brainpoint.png","language":"JavaScript","readme":"# Febs React Web\n\n\n\u003e A framework for building web apps with React Native compatible API.\n\n\u003e 在 [React-web@0.3.2](http://github.com/taobaofed/react-web) 的基础上编写.\n\n\u003e Febs React Web 项目兼容react-native, 能够以react-native方式编写项目, 并且最终导出html/js方式. 基于reactjs, 构建单页/多页webapp.\n\n## Create a new project\n\n0. Install `npm install react-native-cli -g`\n1. Install `npm install febs-react-web-cli -g`\n2. Execute `febs-react-web init \u003cProjectDir\u003e`.\n3. Execute `febs-react-web start` that starts the web dev server\n4. Execute `febs-react-web bundle` that builds the output.\n\n    ( In Linux system maybe use `sudo` )\n\n\n## Fix platform differences\n\n1. Native events without direct pageX/pageY on web platform\n  ```js\n  if (Platform.OS == 'web') {\n    var touch = event.nativeEvent.changedTouches[0];\n    pageX = touch.pageX;\n    pageY = touch.pageY;\n  } else {\n    startX = event.nativeEvent.pageX;\n    startY = event.nativeEvent.pageY;\n  }\n  ```\n\n2. Should run application on web platform\n  ```js\n  AppRegistry.registerComponent('app', () =\u003e app);\n  if(Platform.OS == 'web'){\n    var app = document.createElement('div');\n    document.body.appendChild(app);\n    AppRegistry.runApplication('app', {\n      rootTag: app\n    })\n  }\n  ```\n\n3. Should care about fetch domain on web platform\n  ```js\n  import {\n    Fetch,\n    Jsonp\n  } from 'react-native'\n  ```\n  Jsonp 只支持jsonp格式: callback({json}), 且只能是get方式.\n  Fetch 使用XMLHttpRequest, 需处理跨域问题.\n\n\n4. Without some APIs like `LayoutAnimation` on web platform\n  ```js\n  var LayoutAnimation = require('ReactLayoutAnimation')\n  if(Platform.OS !== 'web'){\n    LayoutAnimation.configureNext(...)\n  }\n  ```\n\n5. Should manually specify the height of ScrollView\n  ```js\n  \u003cScrollView style={{height: 235}} horizontal={true} /\u003e\n  ```\n\n## React Native compatible\n\n#### Components\n\n* ActivityIndicatorIOS - ReactActivityIndicator\n* ActivityIndicator - ReactActivityIndicator\n* DatePickerIOS - ReactDatePicker *TODO*\n* DrawerLayoutAndroid - ReactDrawerLayout\n* Image - ReactImage\n* ListView - ReactListView\n* Modal - ReactModal\n* Navigator - ReactNavigator\n* PickerIOS ReactPicker\n* ProgressViewIOS - ReactProgressView\n* ScrollView - ReactScrollView\n* SegmentedControlIOS - ReactSegmentedControl\n* SliderIOS - ReactSlider\n* Switch - ReactSwitch\n* SwitchAndroid - ReactSwitch\n* SwitchIOS - ReactSwitch\n* RefreshControl - ReactRefreshControl\n* TabBarIOS - ReactTabBar\n* Text - ReactText\n* TextInput - ReactTextInput\n* ToastAndroid - ReactToast\n* Touchable - ReactTouchable\n* TouchableHighlight - ReactTouchableHighlight\n* TouchableOpacity - ReactTouchableOpacity\n* TouchableWithoutFeedback - ReactTouchableWithoutFeedback\n* View - ReactView\n* ViewPagerAndroid - ReactViewPager\n\n#### APIs\n\n* Alert - ReactAlert\n* AlertIOS - ReactAlert\n* Animated - ReactAnimated\n* AppRegistry - ReactAppRegistry\n* AsyncStorage - ReactAsyncStorage\n* Dimensions - ReactDimensions\n* Easing - ReactEasing\n* InteractionManager - ReactInteractionManager\n* LayoutAnimation - ReactLayoutAnimation\n* PanResponder - ReactPanResponder\n* PixelRatio - ReactPixelRatio\n* StyleSheet - ReactStyleSheet\n\n\n#### New Components features\n* ActivityIndicator\n* ViewPagerAndroid\n    - add method: setPageWithoutAnimation\n* WebView\n    - 对于跨站访问需对应服务器添加 meta http-equiv=\"Access-Control-Allow-Origin\" content=\"*\"; 或者添加至headers中\n    - goBack/等函数无效.\n* Picker\n    - 增加一个isRenderSelect:bool属性, 表明是否按照web select方式渲染.\n* Fetch\n    - 增加timeout选项.\n* Navigator\n    - 增加 pushRouteToFront(route, cb) 方法, 允许添加一个route到顶层, 且不刷新页面, 添加完成后调用cb()\n    - 为导航方法如pop,push等添加一个cb参数, 当导航完成时调用.\n* ScrollView\n    - 增加scrollTo动画.\n\n#### New APIs features\n* Platform\n    - add method: select\n* window.requestAnimationFrame\n* window.cancelAnimationFrame\n\n### Api of components\n\n  [febs-react-component](https://github.com/brainpoint/febs-react-component/wiki)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainpoint%2Ffebs-react-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainpoint%2Ffebs-react-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainpoint%2Ffebs-react-web/lists"}