GithubHelp home page GithubHelp logo

commandbar render failed about react-uwp HOT 6 CLOSED

PitterL avatar PitterL commented on June 3, 2024
commandbar render failed

from react-uwp.

Comments (6)

PitterL avatar PitterL commented on June 3, 2024

electron 1.8.8 is work for this

from react-uwp.

PitterL avatar PitterL commented on June 3, 2024

I found the electron boilerplate is not work with , other components are working.
Is any any tips for debugging these to components?

Electron Boilerplate:

https://github.com/mjangir/reactron
https://github.com/electron-react-boilerplate/electron-react-boilerplate

thanks.

from react-uwp.

PitterL avatar PitterL commented on June 3, 2024

Hi, Myxvisual:
I found there caused the and not created out:
when create each primaryCommands elements, there compared the type, when i printed out each elem,

        React.Children.toArray(primaryCommands).filter(
          function (child) { 
            console.log("<CommandBar> child:", child.type, AppBarButton_1.default, child.type == AppBarButton_1.default, child.type == AppBarSeparator_1.default);
            return (child.type === AppBarButton_1.default || child.type === AppBarSeparator_1.default); 
          }
        );

the result show the two function is same but i don't have idea why it's not equal(even use '=='):
child: ƒ AppBarButtonButton() {
return _super !== null && _super.apply(this, arguments) || this;
} ƒ AppBarButtonButton() {
return _super !== null && _super.apply(this, arguments) || this;
} false false

So i temporarily to change the compare variable to child.type.name and AppBarButton_1.default.name:

React.Children.toArray(primaryCommands).filter(function (child) { return (child.type.name === AppBarButton_1.default.name || child.type.name === AppBarSeparator_1.default.name); })

Do you know the reason?

from react-uwp.

PitterL avatar PitterL commented on June 3, 2024

Still found the same issues in
SplitView.prototype.render function:

Use function name to determine the component instead:

React.Children.forEach(children, function (child, index) {
                if (child.type.name === SplitViewPane_1.default.name) {
                    splitViewPanes.push(React.cloneElement(child, {
...

from react-uwp.

myxvisual avatar myxvisual commented on June 3, 2024

Hi, @PitterL sorry for delay in reply, I guess your project has multiple node_modules, which causes the referenced js files to be different.

from react-uwp.

PitterL avatar PitterL commented on June 3, 2024

Actual it is that, the boilerplate use two-package-structure which has get two node_modules
https://www.electron.build/tutorials/two-package-structure

Thank you, Myxvisual .

from react-uwp.

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.