Git Product home page Git Product logo

Comments (2)

malash avatar malash commented on June 15, 2024 2

Hi @Ziyu-Chen

I almost understand your questions. I think there are 2 separate issues.

  1. When and how does GojiJS support custom-tab-bar ?

  2. How to implement the same feature in current GojiJS framework.

At first, GojiJS doesn't custom-tab-bar for now. There are several problems to be decided before we move it into next steps.

  1. This feature is not a common solution that only WeChat and QQ support. Supporting this feature might reduced the cross-platform capabilities.

  2. How to support getTabBar API.

And then, I think you can try these ways to implement the same feature which support not only WeChat/QQ but also other platforms.

  1. Use position: fixed to render custom tab bar on each pages and use wx.redirectTo to switch between them.
// pages/a.tsx

render(
  <>
    <PageA />
    <CustomTabBar />
  </>
);
  1. Treat all tab bar pages rather than the whole Mini Program as a single page application. Switching between tabs actually is internal state changes.
// pages/index.tsx

render(
  <>
    {selected === 'a' && <PageA />}
    {selected === 'b' && <PageB />}
    ...
    <CustomTabBar />
  </>
);

from goji-js.

Ziyu-Chen avatar Ziyu-Chen commented on June 15, 2024

@malash Thank you for your answer! I'll give it a shot.

from goji-js.

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.