Skip to content

Commit 7e1a587

Browse files
committed
Update docs config
1 parent b83f692 commit 7e1a587

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

docs/plugins/react-native-web-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = function (context, options) {
88
resolve: {
99
alias: {
1010
react: path.resolve(__dirname, '..', 'node_modules', 'react'),
11+
'@mobily/stacks': path.resolve(__dirname, '..', '..'),
1112
'react-native$': 'react-native-web',
12-
'@mobily/stacks': path.resolve(__dirname, '..', '..', 'dist', 'index.js'),
1313
},
1414
},
1515
}

docs/src/theme/ReactLiveScope/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
const React = require('react')
2-
const { View, Text, StyleSheet } = require('react-native')
3-
const Stacks = require('@mobily/stacks')
4-
5-
const { StacksProvider } = Stacks
1+
import React from 'react'
2+
import { View, Text, StyleSheet } from 'react-native'
3+
import * as Stacks from '@mobily/stacks'
64

75
const styles = StyleSheet.create({
86
root: {
@@ -27,16 +25,16 @@ const PlaceholderView = props => {
2725
const App = props => {
2826
const { children } = props
2927

30-
return <StacksProvider>{children}</StacksProvider>
28+
return <Stacks.StacksProvider>{children}</Stacks.StacksProvider>
3129
}
3230

3331
const ReactLiveScope = {
3432
...React,
35-
React,
3633
...Stacks,
34+
View,
35+
React,
3736
Placeholder,
3837
PlaceholderView,
39-
View,
4038
Text,
4139
App,
4240
}

0 commit comments

Comments
 (0)