Redux doesn't play well with Platform specific classes, ToolbarModal.ios.js version doesn't connect mapDispatchToProps - react-native

I can't access the prop functions inside *.ios.js file, the android counterpart works well.
export default connect(mapStateToProps, {
updateTextInput, onResetPressed, getRecentSearches, getPopularNearYou,
filterWhereSelected,
})(ToolbarModal);

stupid mistake from my part, my action creator had a faulty, circular import:
import Suggestions from "../components/toolbarModal.ios";
corrected the import and everything works.. it would have been nice if Webstorm would have not proposed this import or it would have detected there is no Suggestions in toolbarModal.ios.

Related

How to use Troisjs in Nuxt 3 project

I would like to use TroisJS (three.js wrapper for Vue) with Nuxt.js. According to the TroisJS documentation (https://troisjs.github.io/guide/install.html#existing-vuejs-3-project) I need to add it to my project like:
import { TroisJSVuePlugin } from 'troisjs';
app.use(TroisJSVuePlugin);
However, I don"t know how to figure out where I should put this code. I would expect the nuxt.config.js file, but I don't seem to quite get it where it should go.
I decided to use TroisJS and not three.js because I thought the former might be easier to import and use. If importing three.js directly is easier, I don't mind using it.
Thank you very much for any help!
In /plugins folder add new file named troisjs-plugin.js with the following content :
import { TroisJSVuePlugin } from 'troisjs';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(TroisJSVuePlugin )
})
I found a repo with some testing with Trois and Nuxt 3, probably outdated and maybe some apis have changed, but if you wanna check it out: alvarosabu/nuxt3-trois
Also, there's an official repo from the Trois author with a Nuxt 3 custom plugin (probably outdated too) here

Importing excel-export for aurelia-slickgrid

If have an ESNext Aurelia project and I'm trying to implement the excel export feature for aurelia-slickgrid. When I use the import statement described in the documentation:
import { ExcelExportService } from '#slickgrid-universal/excel-export';
I get an error that it can't be resolved, which makes sense to me because it doesn't point to anything.
Any help would be appreciated,
Ross

Can't find proper path for sanity.io default rich-date component

I want to use default sanity rich-date plugin in my custom input, but I can’t find the proper import path.
Tried
import DateInput from 'part:#sanity/form-builder/input/rich-date'
and it’s not working
does anybody knows the right path?
import DateInput from '../../node_modules/#sanity/date-input'

PhpStorm Vuejs file move adds '/types' to 'vuex' import statement

I'm working with Vue.js single file components in PhpStorm. When I move a component file into another directory, PhpStorm is adding /type to the end of any vuex import statement, (which blows them up until I do a find/replace to set them all back).
For example:
import {mapActions} from 'vuex';
gets changed to:
import {mapActions} from 'vuex/types';
Anyone know what is causing this or how to fix it? Seems like an odd glitch or maybe setting in the refactoring abilities of PhpStorm ???
It appears to have been a bug in version 2019.1.2, upgrading to 2019.1.3 fixed it.

Getting "undefined is not an object (evaluating '_react2.proptypes.string')" after importing react-native-prompt

I am using the newest version of NPM, the version of exp is 57.0.0. When I add to my code in render method, I get an error "undefined is not an object (evaluating '_react2.proptypes.string')". Without adding everything works perfect.
Both Prop-Types and React-native-prompt are installed.
I have already tried to write import Prompt from 'prop-types'; instead of writing import Prompt from 'react-native-prompt'; but then I am getting the error that hasn't been found in Prop-Types.
Any suggestions on how to fix it?
Thank you
PropTypes moved into separate package. Use prop-types package.
react-native-prompt use outdated style of prop-types so you have to manually solve it.
go to /node-modules/react-native-prompt and edit main files in this way:
import { PropTypes } from 'react'
the above line is incorrect and must be like this:
import PropTypes from 'prop-types'
You have to import PropTypes in this way.
More info here.
Note:
React.PropTypes has moved into a different package since React v15.5. Please use the prop-types library instead. We provide a codemod script to automate the conversion.