Open Brad19 opened 4 years ago
Hi I've a new react app with typescript template and have the following config. I'm getting Expected 0 arguments, but got 1. Can some one please advise.
package.json dependencies : { "ramda": "0.27.0", } "devDependencies": { "@types/ramda": "0.27.4" }
import React from 'react';. import {compose} from 'ramda';. import {withSDKContextProvider} from '@contexts/SDKContext';. const RootApp: React.SFC = () => (. `
import React from 'react';
import {compose} from 'ramda';
import {withSDKContextProvider} from '@contexts/SDKContext';
const RootApp: React.SFC = () => (
</div>`.
);. export default compose<any>( withSDKContextProvider )(RootApp);.
);
export default compose<any>( withSDKContextProvider )(RootApp);
It is throwing error as "Expected 0 arguments, but got 1." Please note this error is not thrown in .js file.
This withSDKContextProvider is a wrapper component and this is how it is
export const withSDKContextProvider = WrappedComponent => {. return class extends React.Component {. render() {. return (. <SDKContextProvider>. <WrappedComponent {...this.props} />. </SDKContextProvider>. );. }. };. };.
export const withSDKContextProvider = WrappedComponent => {
return class extends React.Component {
render() {
return (
<SDKContextProvider>
<WrappedComponent {...this.props} />
</SDKContextProvider>
}
};
@tycho01 / @ikatyang Can you guys or some one please advise. I'm very new to this ramda eco system
hey! I'm under the impression that at this point the Ramda typings over at DefinitelyTyped have outpaced the ones of this repo.
If @ikatyang would be cool with it, perhaps we could put a note to that extent in the readme...
@tycho01 Thanks for your response. So is this usage right? I'm checking this one - https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/compose-function/compose-function-tests.ts. Should i use composeFunction rather than compose?
export default compose<any>( withSDKContextProvider )(RootApp);. // This is the place of error as mentioned above
Please advise an alternative or point me what should i do as i'm new to this.
hm. I'm not sure either, but you can try. for questions on their types tho, you might be better off creating an issue over there...
Hi I've a new react app with typescript template and have the following config. I'm getting Expected 0 arguments, but got 1. Can some one please advise.
package.json dependencies : { "ramda": "0.27.0", } "devDependencies": { "@types/ramda": "0.27.4" }
This is my RootApp.tsx
import React from 'react';
.import {compose} from 'ramda';
.import {withSDKContextProvider} from '@contexts/SDKContext';
.const RootApp: React.SFC = () => (
. `This is the home page of the app
);
.export default compose<any>( withSDKContextProvider )(RootApp);
.It is throwing error as "Expected 0 arguments, but got 1." Please note this error is not thrown in .js file.
This withSDKContextProvider is a wrapper component and this is how it is
export const withSDKContextProvider = WrappedComponent => {
.return class extends React.Component {
.render() {
.return (
.<SDKContextProvider>
.<WrappedComponent {...this.props} />
.</SDKContextProvider>
.);
.}
.};
.};
.@tycho01 / @ikatyang Can you guys or some one please advise. I'm very new to this ramda eco system
hey! I'm under the impression that at this point the Ramda typings over at DefinitelyTyped have outpaced the ones of this repo.
If @ikatyang would be cool with it, perhaps we could put a note to that extent in the readme...
@tycho01 Thanks for your response. So is this usage right?
I'm checking this one - https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/compose-function/compose-function-tests.ts. Should i use composeFunction rather than compose?
Please advise an alternative or point me what should i do as i'm new to this.
hm. I'm not sure either, but you can try. for questions on their types tho, you might be better off creating an issue over there...