|
@@ -14,7 +14,7 @@ import RootComp from './modules/RootComp';
|
|
import ImageComp from './modules/Image';
|
|
import ImageComp from './modules/Image';
|
|
import ButtonComp from './modules/Button';
|
|
import ButtonComp from './modules/Button';
|
|
import Environment from './environment';
|
|
import Environment from './environment';
|
|
-
|
|
|
|
|
|
+import * as Font from 'expo-font';
|
|
import Module from './modules';
|
|
import Module from './modules';
|
|
console.log("@@@@@@@@@@@@@@")
|
|
console.log("@@@@@@@@@@@@@@")
|
|
console.log(Module)
|
|
console.log(Module)
|
|
@@ -150,18 +150,38 @@ CS.import(Environment);
|
|
|
|
|
|
|
|
|
|
const useForceUpdate = (text) => useState(text)[1];
|
|
const useForceUpdate = (text) => useState(text)[1];
|
|
-export default function App() {
|
|
|
|
- let [text, setText] = useState('');
|
|
|
|
- let forceUpdate = useForceUpdate(text);
|
|
|
|
- // let currentView = NCS.render();
|
|
|
|
- let currentView2 = CS.render();
|
|
|
|
- // console.log(currentView2)
|
|
|
|
- return <Div>
|
|
|
|
|
|
+export default class App extends React.Component {
|
|
|
|
+ constructor(){
|
|
|
|
+ super()
|
|
|
|
|
|
- {currentView2}
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- </Div>;
|
|
|
|
-}
|
|
|
|
|
|
+ /*let [text, setText] = useState('');
|
|
|
|
+ let forceUpdate = useForceUpdate(text);
|
|
|
|
+ */
|
|
|
|
+ componentDidMount() {
|
|
|
|
+ Font.loadAsync({
|
|
|
|
+ 'black': require('./assets/fonts/SFCompactDisplay-Black_0.otf'),
|
|
|
|
+ 'bold': require('./assets/fonts/SFCompactDisplay-Bold_0.otf'),
|
|
|
|
+ 'heavy': require('./assets/fonts/SFCompactDisplay-Heavy_0.otf'),
|
|
|
|
+ 'light': require('./assets/fonts/SFCompactDisplay-Light_0.otf'),
|
|
|
|
+ 'medium': require('./assets/fonts/SFCompactDisplay-Medium_0.otf'),
|
|
|
|
+ 'regular': require('./assets/fonts/SFCompactDisplay-Regular_0.otf'),
|
|
|
|
+ 'semibold': require('./assets/fonts/SFCompactDisplay-Semibold_0.otf'),
|
|
|
|
+ 'thin': require('./assets/fonts/SFCompactDisplay-Thin_0.otf'),
|
|
|
|
+ 'ultralight': require('./assets/fonts/SFCompactDisplay-Ultralight_0.otf')
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ render(){
|
|
|
|
+ let currentView2 = CS.render();
|
|
|
|
+ return (
|
|
|
|
+ <Div>
|
|
|
|
+ <Div>{CS.ModuleSystem.createElementCtor(ButtonComp)}</Div>
|
|
|
|
+ <Div>{currentView2}</Div>
|
|
|
|
+ </Div>)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
const ImageStyle = StyleSheet.create({
|
|
const ImageStyle = StyleSheet.create({
|