GithubHelp home page GithubHelp logo

React 16 - Not working about bloomer HOT 16 CLOSED

algusdark avatar algusdark commented on May 18, 2024
React 16 - Not working

from bloomer.

Comments (16)

AlgusDark avatar AlgusDark commented on May 18, 2024 1

Thanks, I'm going to check these :D

from bloomer.

AlgusDark avatar AlgusDark commented on May 18, 2024 1

We need @MDOR help on this one

from bloomer.

AlgusDark avatar AlgusDark commented on May 18, 2024

Maybe we can import create-react-class and prop-types for the moment since we want to create a new major version with styled-components.

@panbhatt want to help us with this ticket?

from bloomer.

panbhatt avatar panbhatt commented on May 18, 2024

@AlgusDark : Sure, I can help up. I know react (intermediate level) and Bulma. If you can provide me a guidance I can do it.

from bloomer.

AlgusDark avatar AlgusDark commented on May 18, 2024

Thanks @panbhatt.

The first think to do is to upgrade React on package.json to last stable one (right now we're using 15 for docs) on dev-dependencies so we can test it in docs.

Then we can add create-react-class and prop-types to "dependencies" in package.json, that way we can ensure that final users should install those dependencies.

Can you add "peerDependencies " at package.json with React last stable version?

I believe that's the only think that we need. You can test it by npm installing bloomer locally (E.G. npm install <folder>) and see if everything is working :)

A better approach would be to rewrite exports on every element/component/.. in Bloomer, but since we want to implement styled-components, then it's better to go with the approach of package.json changes.

from bloomer.

panbhatt avatar panbhatt commented on May 18, 2024

I tried that. however i am receiving a number of errors.
ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:3531:19
TS2320: Interface 'Element' cannot simultaneously extend types 'ReactElement' and 'ReactElement'.
Named property 'type' of types 'ReactElement' and 'ReactElement' are not identical.

ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:3532:19
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}>' and 'Component<any, {}>'.
Named property 'forceUpdate' of types 'Component<any, {}>' and 'Component<any, {}>' are not identical.

ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:3532:19
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}>' and 'Component<any, {}>'.
Named property 'refs' of types 'Component<any, {}>' and 'Component<any, {}>' are not identical.

ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:3532:19
TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}>' and 'Component<any, {}>'.
Named property 'setState' of types 'Component<any, {}>' and 'Component<any, {}>' are not identical.

ERROR in [at-loader] ./src/bulma.tsx:400:28
TS2605: JSX element type 'Component<T & HTMLProps, ComponentState>' is not a constructor function for JSX elements.
Types of property 'render' are incompatible.
Type '() => ReactNode' is not assignable to type '{ (): ReactNode; (): false | Element; (): false | Element; (): false | Element; (): false | Eleme...'.
Type 'ReactNode' is not assignable to type 'false | Element'.
Type 'string' is not assignable to type 'false | Element'.

ERROR in [at-loader] ./src/bulma.tsx:400:76
TS2605: JSX element type 'Component<T & HTMLProps, ComponentState>' is not a constructor function for JSX elements.

from bloomer.

AlgusDark avatar AlgusDark commented on May 18, 2024

Did you upgraded TypeScript types for React? -> https://github.com/AlgusDark/bloomer/blob/master/package.json#L19

from bloomer.

panbhatt avatar panbhatt commented on May 18, 2024

i tried after updating all the things.

DEV dependencies is :
"@ types/classnames": "^2.2.3",
"@ types/enzyme": "^3.1.6",
"@ types/jest": "^22.0.1",
"@ types/node": "^8.0.17",
"@ types/react": "^16.0.34",
"@ types/react-dom": "^16.0.3",
"@ types/react-router-dom": "^4.2.3",
"awesome-typescript-loader": "^3.2.1",
......

}
"dependencies": {
"classnames": "^2.2.5",
"create-react-class": "^15.6.2",
"jest-cli": "^22.0.4",
"prop-types": "^15.6.0",
"shx": "^0.2.2",
"tslib": "^1.7.0"
},

I am still getting errors.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3405,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'div' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>', but here has type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3406,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'dl' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLDListElement>', but here has type 'DetailedHTMLProps<HTMLAttributes, HTMLDListElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3407,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'dt' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3408,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'em' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3409,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'embed' must be of type 'DetailedHTMLProps<EmbedHTMLAttributes, HTMLEmbedElement>', but here has type 'DetailedHTMLProps<EmbedHTMLAttributes, HTMLEmbedElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3410,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'fieldset' must be of type 'DetailedHTMLProps<FieldsetHTMLAttributes, HTMLFieldSetElement>', but here has type 'DetailedHTMLProps<FieldsetHTMLAttributes, HTMLFieldSetElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3411,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'figcaption' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>', but here has type 'DetailedHTMLProps<HTMLAttributes, HTMLElement>'.
node_modules/@types/react-dom/node_modules/@types/react/index.d.ts(3412,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'figure' must be of type 'DetailedHTMLProps<HTMLAttributes, HTMLE

from bloomer.

jonasgrunert avatar jonasgrunert commented on May 18, 2024

Do you still need help?

from bloomer.

AlgusDark avatar AlgusDark commented on May 18, 2024

@jonasgrunert that would be really helpful, I'm working on the styled-components implementation.

from bloomer.

jonasgrunert avatar jonasgrunert commented on May 18, 2024

@AlgusDark Did it today. Should be fine and refined some testing. Love your work .)
Already created a Pull Request #87
If I can support in any other way let me know.

from bloomer.

jonasgrunert avatar jonasgrunert commented on May 18, 2024

I found the error in the travis:ci right now and tried to fix ist. My own Travis build crashes due to timeout. What should I do from there?

from bloomer.

jonasgrunert avatar jonasgrunert commented on May 18, 2024

Fixed it. Feel free to merge.

from bloomer.

panbhatt avatar panbhatt commented on May 18, 2024

Thanks Team. :)

from bloomer.

jjwilliams42 avatar jjwilliams42 commented on May 18, 2024

Any update on this?

from bloomer.

jjwilliams42 avatar jjwilliams42 commented on May 18, 2024

Sweet, thanks @AlgusDark and @MDOR!

I just noticed that the last release was nearly a year ago, do you guys have plans to release to NPM? Or maybe you don't store releases in github.

from bloomer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.