KuzniaCo / chemistry-app

4 stars 3 forks source link

Added ui-kitten, Checked if it works in App.tsx #22

Closed komolcia closed 2 years ago

komolcia commented 2 years ago

Works on iOS simulator

hubcio2115 commented 2 years ago

App doesn't build for web, throwing a real long exception.

./node_modules/@ui-kitten/components/ui/input/input.component.js 105:38
Module parse failed: Unexpected token (105:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.webEventResponder = devsupport_1.WebEventResponder.create(this);
|         this.focus = () => {
>             this.textInputRef.current?.focus();
|         };
|         this.blur = () => {
./node_modules/@ui-kitten/components/ui/calendar/baseCalendar.component.js 105:47
Module parse failed: Unexpected token (105:47)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|                 pickerDate: nextVisibleDate,
|             }, () => {
>                 this.props.onVisibleDateChange?.(this.state.visibleDate, this.state.viewMode.id);
|             });
|         };
./node_modules/@ui-kitten/components/ui/calendar/rangeCalendar.component.js 106:32
Module parse failed: Unexpected token (106:32)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     selectedDate() {
>         return this.props.range?.startDate;
|     }
|     onDateSelect(date) {
./node_modules/@ui-kitten/components/ui/tab/tabBar.component.js 137:37
Module parse failed: Unexpected token (137:37)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     scrollToIndex(params) {
>         this.tabIndicatorRef.current?.scrollToIndex(params);
|     }
|     scrollToOffset(params) {
./node_modules/@ui-kitten/components/ui/popover/popover.component.js 151:38
Module parse failed: Unexpected token (151:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     }
|     componentWillUnmount() {
>         this.hardwareBackSubscription?.remove();
|         this.hide();
|         this.isPopoverUnmounted = true;
./node_modules/@ui-kitten/components/ui/select/select.component.js 169:36
Module parse failed: Unexpected token (169:36)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.expandAnimation = new react_native_1.Animated.Value(0);
|         this.show = () => {
>             this.popoverRef.current?.show();
|         };
|         this.hide = () => {
./node_modules/@ui-kitten/components/ui/datepicker/baseDatepicker.component.js 26:37
Module parse failed: Unexpected token (26:37)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.calendarRef = react_1.default.createRef(); // FIXME: ts
|         this.scrollToToday = () => {
>             this.calendarRef.current?.scrollToToday();
|         };
|         this.scrollToDate = (date) => {
./node_modules/@ui-kitten/components/ui/list/list.component.js 50:33
Module parse failed: Unexpected token (50:33)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.listRef = react_1.default.createRef();
|         this.scrollToEnd = (params) => {
>             this.listRef.current?.scrollToEnd(params);
|         };
|         this.scrollToIndex = (params) => {
./node_modules/@ui-kitten/components/ui/icon/icon.component.js 62:27
Module parse failed: Unexpected token (62:27)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         super(props);
|         this.startAnimation = (callback) => {
>             this.animation?.start(callback);
|         };
|         this.stopAnimation = () => {
./node_modules/@ui-kitten/components/ui/tooltip/tooltip.component.js 90:36
Module parse failed: Unexpected token (90:36)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.popoverRef = react_1.default.createRef();
|         this.show = () => {
>             this.popoverRef.current?.show();
|         };
|         this.hide = () => {
./node_modules/@ui-kitten/components/ui/autocomplete/autocomplete.component.js 95:36
Module parse failed: Unexpected token (95:36)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.inputRef = react_1.default.createRef();
|         this.show = () => {
>             this.popoverRef.current?.show();
|         };
|         this.hide = () => {
./node_modules/@ui-kitten/components/ui/overflowMenu/overflowMenu.component.js 99:36
Module parse failed: Unexpected token (99:36)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         this.popoverRef = react_1.default.createRef();
|         this.show = () => {
>             this.popoverRef.current?.show();
|         };
|         this.hide = () => {

For iOS works fine.

komolcia commented 2 years ago

For web you have to use different components, if I remember correctly

komolcia commented 2 years ago

Does our app need to be for web and phone?

hubcio2115 commented 2 years ago

I fixed the issue with this workaround. Personally never heard of ui-kitten and it has not a great start... The thread I sent is 2 years old and it's weird that they hadn't fixed it already.

hubcio2115 commented 2 years ago

Does our app need to be for web and phone?

We won't be shipping production for web initially, but eventually yes. For now we are using web view for developing since it eats less resources than app running on an emulator.

hubcio2115 commented 2 years ago

For web you have to use different components, if I remember correctly

Yeah but it is still an experimental feature.

image
BartoszBrodowski commented 2 years ago

I think we should talk about whether we're already building for mobile and web or only mobile at the next meeting. The library is being maintained, as the latest version came out 28 days ago.

bartlomiejmont commented 2 years ago

For web you have to use different components, if I remember correctly

As we chose React native instead of PWA, web app is not something worth spending our time.