You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the library, when using the useUnleashContext function, I am getting an error related with internal types of this library .
Steps to reproduce the bug
Run npm i --save unleash-proxy-client @unleash/proxy-client-react
Import useUnleashContext in any file
Expected behavior
No response
Logs, error output, etc.
TypeScript error in /Users/pedromoraisf/www/work/admission/gupy-front-admission/admission-companies/node_modules/@unleash/proxy-client-react/dist/src/FlagContext.d.ts(2,13):
'=' expected. TS1005
1 | import React from 'react';> 2 | import type { UnleashClient } from 'unleash-proxy-client';| ^
3 |export interface IFlagContextValue extends Pick<UnleashClient, 'on'|'updateContext'|'isEnabled'|'getVariant'> {
4 | client: UnleashClient;
5 | flagsReady: boolean;
Screenshots
No response
Additional context
I'm using skipLibCheck: true in tsconfig.json
node_modules has in exclude option, on tsconfig.json
Searching on the web, i have found this page, where one person thinks the problem has to do with some type declaration in the package.json of that lib (@unleash/proxy-client-react)
Unleash version
4.10.5
Subscription type
No response
Hosting type
No response
SDK information (language and version)
No response
The text was updated successfully, but these errors were encountered:
Hey @pedromoraisf . I created an example project based on your setup, but could not reproduce this TS error. Here it is https://github.com/sjaanus/proxy-client-react-73. Does this repository also throw you the same error? Hopefully we will catch the cause of your issue. 😃
I managed to resolve the errors. For the error in the issue description, I got the resolution by upgrading to TypeScript 3.9.10 (previously it was at version 3.7.4).
Then the following error started happening:
The solution was to encapsulate UnleashProvider very high in the React render tree hierarchy. I started right after the component that starts redux, in the application.
Describe the bug
After installing the library, when using the
useUnleashContext
function, I am getting an error related with internal types of this library .Steps to reproduce the bug
npm i --save unleash-proxy-client @unleash/proxy-client-react
useUnleashContext
in any fileExpected behavior
No response
Logs, error output, etc.
Screenshots
No response
Additional context
skipLibCheck: true
intsconfig.json
node_modules
has inexclude
option, ontsconfig.json
package.json
of that lib (@unleash/proxy-client-react
)Unleash version
4.10.5
Subscription type
No response
Hosting type
No response
SDK information (language and version)
No response
The text was updated successfully, but these errors were encountered: